Menu

#78 Upload doesn't properly handle multipart/form-data

open
nobody
5
2005-02-28
2005-02-28
No

Each element of a multipart/form-data can be
transport-encoded, per RFC 1867 section 7.

Upload, instead, and arbitrarily, assumes text/plain
for everything but a mime part with filename set, and
that (it assumes) is binary encoded.

In the best of all possible worlds, we'd be able to
hand off to the tcllib mime package, but it doesn't
stream properly, so that's out.

Next best would be to read each component as a mime
part, and hand each part off to mime for conversion
(for those conversions it understands, at least.)

The downside of this is that one would have to read an
entire file before processing by mime. Large files
would become expensive to process.

Note, it seems that browsers happen to format
multipart/form-data as tclhttpd expects, so it's not a
pressing problem. Just not RFC compliant.

Discussion


Log in to post a comment.