New submission from Clovis Fabricio <[EMAIL PROTECTED]>: The finish_content method in wsgiref.handlers.BaseHandler class resets Content-Length to "0" if there was no content returned by the application, even if the application has set it already.
That makes impossible to implement things like HEAD requests in the application, which should return the Content-Length without returning actual content. The desired behavior would be to respect the header set by the wsgi application, using "0" as a default value instead. ---------- components: Library (Lib) files: wsgiref.handlers.py.patch keywords: patch messages: 73045 nosy: nosklo severity: normal status: open title: wsgi.simple_server resets 'Content-Length' header on empty content even if app defined it. type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file11466/wsgiref.handlers.py.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3839> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com