Standalone HTTP parser?

Steve Holden steve at holdenweb.com
Thu May 31 16:41:57 EDT 2007


Christopher Stawarz 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.
> 
Look at rfc822 or the email module - HTTP responses are in the same 
format, modulo the first line status. Requests too, though with a 
different format for the first line.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com        squidoo.com/pythonology
tagged items:         del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------




More information about the Python-list mailing list