durusmail: quixote-users: Python 2.2.2's rfc822 breaks http_request.py
Python 2.2.2's rfc822 breaks http_request.py
2002-12-11
2002-12-11
2002-12-11
Python 2.2.2's rfc822 breaks http_request.py
David Edwards
2002-12-11
Greetings,

I'm using Quixote 0.5.1 with Medusa.

from http://www.python.org/2.2.2/NEWS.txt:
"- In rfc822.py: change the default for Message.get() back to None."

medusa_http.py uses Message.get() to build the environment for HTTPRequest.
Because some headers that QuixoteHandler.continue_request is looking for
don't exist, the environment has some values of None.

When my app raises an exception, html_quote eventually gets called with
an argument of None while dumping the request's environment and gets
tangled up looking for a fallback value.

Attached patch to medussa_http.py fixes this by converting Nones to empty
strings in environ.


--
david edwards
reply