mitsuhiko/werkzeug — pull request #126 by scullyx13 (2011-10-25 11:12:02+00:00)
Title: Fix parse_multipart_headers

Hello!

I found a bug in the parsing of multipart request headers.

When we do iterated line-based representation message could break into pieces like ['...\r\nboundary\r', '\n', 'Header: header value\r\n']. To the parse_multipart_headers function input we send ['\n', 'Header: header value\r\n' ]. It does noy support this format and returns Headers([]). It breaks function parse_form_data fwith error 'Missing Content-Disposition header'. My patch fixes the bug. After patching function returns Headers([('Header', 'header value')]).