Extracting code which parses HTTP headers into stand alone library?

15 views
Skip to first unread message

Piotr Dobrogost

unread,
Mar 10, 2014, 5:39:52 AM3/10/14
to paste...@googlegroups.com
Hi!

It seems there's no Python library concerned only with parsing HTTP headers which strikes me as odd taking into account how popular Python is in web programming.
WebOb deals with parsing HTTP headers among other things so I guess the code is already there but it's integral part of the library so it's all or nothing proposition.

What do you think about extracting code, that parses HTTP headers into its own library so that it could be easily used by other projects?


Regards,
Piotr Dobrogost

Piotr Dobrogost

unread,
Mar 10, 2014, 5:12:44 PM3/10/14
to Gael Pasgrimaud, paste...@googlegroups.com
On Mon, Mar 10, 2014 at 9:32 PM, Gael Pasgrimaud <ga...@gawel.org> wrote:
>
> What about https://github.com/benoitc/http-parser ?
>
Thanks for info. It looks nice.
Btw, at https://github.com/benoitc/http-parser one reads
"HTTP request/response parser for python in C"
and then later on the same page
"If possible a C parser based on http-parser from Ryan Dahl will be used."

The former one suggests compiling C code is necessary and the latter
one suggests it's optional. Maybe they could use better wording?

> WebOb do not parse headers. WebOb use the environ dict which already contains
> parsed headers. As described in the wsgi specs parsing headers is the
> responsability of the server.

Good to know. Btw, do you know what WSGI servers use http-parser lib?

Regards,
Piotr

ps.
Any idea why I don't see your post in google groups interface at
https://groups.google.com/forum/#!topic/paste-users/quSxoSsnyp8?
Reply all
Reply to author
Forward
0 new messages