benoitc/http-parser — pull request #38 by geertj (2013-04-25 15:32:09+00:00)
Title: Add a "header_only" option to the parser.

This option should be set to True when parsing the response to a HEAD method. The HEAD method is special because it has no body even if according to the response headers it has a body.

This patch is necessary when pipelining HEAD requests. The response for a later request could mistakenly be interpreted as being the body to a previous HEAD response.

I have not added the updated parser.c to this pull request, so Travis will likely fail again. I do not think it is possible to have the diffs to parser.c from this pull commute with the diffs from my other pull request. Maybe the setup.py should be updated to regenerate the parser when building.