benoitc/http-parser — pull request #37 by geertj (2013-04-25 15:23:59+00:00)
Title: Add "header_only" option to parser

This patch set adds a 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. 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.