Ok, problem located. There was a bug in the multipart splitter which previously was hidden by _another_ bug in the header parser. So when grubba fixed the header parser bug, multipart handling stopped working. (More precisly, it will fail if the boundary string is followed by \r\n, as the RFC specifices, but it will still work if it just followed by \n.)
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-02-01 20:21: Subject: Re: MIME.Message problem with 7.4
On Sat, 1 Feb 2003, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Could you show us the input to MIME.Message in this case? If I test with a trivial message, I get the expected result:
Pike v7.4 release 13 running Hilfe v3.5 (Incremental Pike Frontend)
MIME.Message("Content-Disposition: form-data; name="1"\n\n")->disp_params;
(1) Result: ([ /* 1 element */ "name":"1" ])
Of course, here is the output from the different writes I put in the code:
data="-----------------------------15261807498418654551597658587\r\nContent-Disposition: form-data; name="CaudiumSID"\r\n\r\n5fu8|sOWwkVKE9O5M6anDpq|1ME-\r\n-----------------------------15261807498418654551597658587\r\nContent-Disposition: form-data; name="file"; filename="test"\r\nContent-Type: application/octet-stream\r\n\r\nContent-Type: multipart/form-data; boundary=---------------------------11479027812035015474368800899\nContent-Length: 493\n\n-----------------------------11479027812035015474368800899\nContent-Disposition: form-data; name="CaudiumSID"\n\nnznqeZnskwxfTLoDPrWh2H3fg28-\n-----------------------------11479027812035015474368800899\nContent-Disposition: form-data; name="file"; filename="test.txt"\nContent-Type: text/plain\n\nTest\n\n-----------------------------11479027812035015474368800899\nContent-Disposition: form-data; name="1"\n\nUpload to attachments\n-----------------------------11479027812035015474368800899--\n\r\n-----------------------------15261807498418654551597658587\r\nContent-Disposition: form-data; name="1"\r\n\r\nUpload to attachments\r\n-----------------------------15261807498418654551597658587--\r\n", request_headers=([ /* 12 elements */
"accept":"text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1", "accept-charset":"ISO-8859-1, utf-8;q=0.66, *;q=0.66", "accept-encoding":"gzip, deflate, compress;q=0.9", "accept-language":"fr-fr, en;q=0.50", "connection":"keep-alive", "content-length":"1099", "content-type":"multipart/form-data; boundary=---------------------------15261807498418654551597658587", "cookie":"SessionID=c1eb4ee22a64d74544d869342cb62a96; CaudiumSID=c4UUnZwf61tTTKO8zvJFU2_LDIg-", "host":"localhost:81", "keep-alive":"300", "referer":"http://localhost:81/tmp/test.html", "user-agent":"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9" ]) part->disp_params=([ ]), part->getdata="Content-Disposition: form-data; name="CaudiumSID"\r\n\r\n5fu8|sOWwkVKE9O5M6anDpq|1ME-", part->headers=([ ]) part->disp_params=([ ]), part->getdata="Content-Disposition: form-data; name="file"; filename="test"\r\nContent-Type: application/octet-stream\r\n\r\nContent-Type: multipart/form-data; boundary=---------------------------11479027812035015474368800899\nContent-Length: 493\n\n-----------------------------11479027812035015474368800899\nContent-Disposition: form-data; name="CaudiumSID"\n\nnznqeZnskwxfTLoDPrWh2H3fg28-\n-----------------------------11479027812035015474368800899\nContent-Disposition: form-data; name="file"; filename="test.txt"\nContent-Type: text/plain\n\nTest\n\n-----------------------------11479027812035015474368800899\nContent-Disposition: form-data; name="1"\n\nUpload to attachments\n-----------------------------11479027812035015474368800899--\n", part->headers=([ ]) part->disp_params=([ ]), part->getdata="Content-Disposition: form-data; name="1"\r\n\r\nUpload to attachments", part->headers=([ ])
-- David Gourdelier
/ Brevbäraren