Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 Lib/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def parse_headers(fp, _class=HTTPMessage):
if line in (b'\r\n', b'\n', b''):
break
hstring = b''.join(headers).decode('iso-8859-1')
return email.parser.Parser(_class=_class).parsestr(hstring)
return email.parser.Parser(_class=_class).parsestr(hstring, headersonly=True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a change like this, please

  1. Please create bugs.python.org ticket, and show us the problem with steps to reproduce.
  2. Show how this fixes along with a tests.
  3. We need to document this too.

This patch is incomplete (even for review) without all three above.

@pareshverma91 pareshverma91 Apr 5, 2017

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I have created a bug at https://bugs.python.org/issue29991. I will soon send out an update to the PR with some tests.



class HTTPResponse(io.BufferedIOBase):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.