[issue21114] wsgiref.simple_server doesn't handle multi-line headers correctly

Alan Braithwaite report at bugs.python.org
Mon Mar 31 19:02:31 CEST 2014


New submission from Alan Braithwaite:

At wsgiref.simple_server:99, it uses the wrong field to get the headers from the request.  In rfc822.Message.readheaders it describes that the headers attribute is an uninterrupted list of the lines in the header.  The dict attribute of Message should contain the proper key/value map of the headers.

I've attached a patch of what I think the behavior should be.  This has incidentally been fixed in python 3+.

----------
components: Library (Lib)
files: simple_server.py.patch
keywords: patch
messages: 215251
nosy: Alan.Braithwaite
priority: normal
severity: normal
status: open
title: wsgiref.simple_server doesn't handle multi-line headers correctly
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file34684/simple_server.py.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21114>
_______________________________________


More information about the Python-bugs-list mailing list