title: Parse Raw HTTP in Python
body: <p>I am looking for a library or function call in python or an associated library that would let me feed in a raw stream of text data representing an HTTP req/res and that would spit out that information is some sort of meaningful form like a dictionary or list. I do not want to use some built in class or create a bunch of new objects, in my program I am receiving in some raw data and that is just what I've got to work with. Is there already a solution out there for this, or do I have to write an HTTP parser myself?</p>
  
  <p>Edit: Let me clarify what exactly I'm looking to do. I'm looking for something that would take a string like:</p>
  
  <pre><code>GET /index.html HTTP/1.1 \r\n
  Host:www.stackoverflow.com \r\n
  User-Agent:Firefox \r\n
  etc.
  </code></pre>
  
  <p>And send me back something encapsulating the method, HTTP version, headers and all the rest.</p>