Standalone HTTP parser?

Jean-Paul Calderone exarkun at divmod.com
Thu May 31 17:17:09 EDT 2007


On Thu, 31 May 2007 14:07:00 -0400, Christopher Stawarz <cstawarz at csail.mit.edu> wrote:
>Does anyone know of a standalone module for parsing and generating
>HTTP messages?  I'm looking for something that will take a string and
>return a convenient message object, and vice versa.  All the Python
>HTTP parsing code I've seen is either intimately bound to the
>corresponding socket I/O operations (e.g. httplib, httplib2,
>BaseHTTPServer) and/or buried in somebody's framework (e.g. Twisted).
>
>I want to write some HTTP servers/clients that do asynchronous I/O
>using my own engine (multitask), so I need a HTTP package that won't
>insist on doing the I/O for me.
>

Neither of Twisted's HTTP implementations insist on doing the I/O
for you.  All protocols in Twisted are independent of their transport.
You can feed them data any way you like.

Jean-Paul



More information about the Python-list mailing list