From: Bruce Fitzsimons <BruceYaws@Fitzsimons.org> - 2007-12-18 02:42:40
Dear List, (resent with the correct sender address)
I have just been digging into the world of multipart posts, and it is a
strange and wonderful place. I've been looking for a nice way of posting
a file plus some associated user attributes (e.g. a selector for
MSC,SGSN,GGSN cdr types, for decoding with the correct ASN.1 files).
Looking at the yaws_api code it appears that it only decodes one
complete section, so that it presents the header, and the file contents,
but not the posted attributes from the form. These are in another mime
section (segmented by the MIME boundary markers). At least according to
I'll admit to not completely tracing this through yet, I've been playing
with the example code and instrumenting it to see what occurs. I've also
dug into the yaws_api.erl code and it appears to only want to consider
one boundary, with a special case for the header of the real content. I
can't see any "you've finished this section, but there is another
section" indicator coming back from yaws_api although there are hints
about this possibility in the boundary processing.
I do appreciate that this is a nasty problem, in there are multiple
round trips that potentially cross multiple MIME boundaries, but it is
in the standards and seems useful:
1. Has anyone done this in yaws before?
2. Have I overlooked some subtlety that allows the processing code to be
informed of the boundaries without stopping processing?
3. Should I have a go at adding it?