in reply to Help on Parsing MIME

Do you have a line specifying the boundary, like this

Content-Type: multipart/mixed; boundary="MIMEBoundaryurn_uuid_5922B37D +7F43649CB512578951566415053"

at the beginning of the input data?  (there should be...   see also rfc2046, section 5.1)

Replies are listed 'Best First'.
Re^2: Help on Parsing MIME
by fert (Acolyte) on Nov 12, 2009 at 17:42 UTC
    no, this is the exact text I get back from the call, I thought this was weird as well

      As a workaround/heuristic, maybe you could reconstruct it yourself from the lines such as --MIMEBoundaryurn_uuid_5922B37D7F43649CB512578951566415053 (i.e. strip off the "--"), and simply prepend the required multipart header to the response before passing it to the parser...

      Better yet, of course, fix the response in the first place (if that's an option).

        Ok so then this is definitely encoded wrong by the provider. I finally found some code on this (very very large internet company)'s confusing developer area. The code they have basically uses regex's to chop it all up. Its nice to know they are following standards... Thanks for the help!