[OGo-Developer] multipart/form-data and text encoding
Wolfgang Sourdeau
developer@opengroupware.org
Thu, 23 Aug 2007 15:11:31 -0400
On 2007-08-23 14:01:38 -0500 Helge Hess <helge.hess@opengroupware.org>
wrote:
> On 23.08.2007, at 00:09, Wolfgang Sourdeau wrote:
>> I think there was mention of modifying the parsers instead
>
> I have not found the time to look at the changes yet, but changing
> default
> encodings for decoding from ASCII to UTF-8 should almost always make
> sense
> (since every ASCII char is a valid UTF-8 char).
My idea is actually that the parser or the parser delegate should
return the charset for NGMime objects which have none specified. Hence
the change to return nil instead of returning a default, in
NGMimeBodyPart.
> Anyways, the more important thing is that we should not work on
> NGHttpRequest and the NGMime based HTTP parser! Quite a while ago I
> started
> that "SimpleHTTPParser" which can be enabled using the
> "WOHttpTransactionUseSimpleParser" default. (and in fact its much
> more
> reliable and efficient for WebDAV usage!, so its recommended for
> ZideStore/xmlrpcd)
>
> The NGMime stuff is *quite* complex (and I'm relunctant to change a
> lot
> there, because it works quite well for b0rked messages). This is
> necessary
> for mail, but completely unnecessary for HTTP which is rather clean
> and well
> implemented in 'da real world.
I could do this and then rely on the WOMessageUseUTF8 to parse the
results. We might as well change
WOMessageUseUTF8 to WOMessageCharset instead, for the sake people
using yet another different charset.
> There is only one issue which is why the SimpleParser is not enabled
> by
> default: it doesn't implement multipart/formdata=>WORequest decoding
> (which
> is not that hard, but some work).
I already did such a parser in perl a few years ago, I think I could
write one very quickly.
Wolfgang