Short answer: Yes, multiline headers are allowed there, and yes, mod_python will fail to read them properly.

Longer answer:
I checked throught the util.py code, and nope, the fix is not in there.

I browsed through the appropriate RFC documents, in particular RFC1521
http://www.faqs.org/rfcs/rfc1521.html
This clearly states that RFC822 headers are to be used, which means that those multiline headers are indeed allowed. The 1521 document even contains samples with multiline headers.

Just a thought: Can we (re)use the rfc822 mime parser that's already built-in in Python to do the work for us?

--
Mike Looijmans
Philips Natlab / Topic Automation


Graham Dumpleton wrote:
With FieldStorage being discussed on main user mailing list, came across
this old post of the mailing list:

  http://www.modpython.org/pipermail/mod_python/2001-November/012256.html

What it is saying is that some HTTP clients use multi line headers in sections
of multipart/form postings and that mod_python doesn't handle this.

Looking at FieldStorage code, which I don't grok right at this minute
because of an intensive coding frenzy today on the back of not enough
sleep last night, I can't see that it has ever been modified to accomodate
such multiline headers if indeed it needs to.

Anyone who is more intimate with FieldStorage code want to have a
better look at validity of original mailing list post and whether multiline
headers are legitimate and whether there indeed could be a problem in
mod_python.

Graham

Reply via email to