From: Divye K. <div...@gm...> - 2008-08-12 19:39:20
|
Hi, On Tue, Aug 12, 2008 at 2:24 PM, Dean Michael Berris <mik...@gm... > wrote: > > About multi-part message posting, I have not seen any documentation > regarding the semantics for a multi-part POST message. If it has > something to do with MIME, then that library has yet to be written > external to the HTTP implementation. AFAICT, each HTTP POST Message > has a single body, and a single Content-Length and Content-Type > headers -- If the actual body is a multi-part message, then I think > the body should have to be formed accordingly, and the Content-Type > correctly as well to something like 'multi-part/mixed; > boundary="some_boundary"'. The HTTP Client will then be sufficient in > its current form to be able to do: > The documentation for sending multiple files/form-fields/data via POST (multipart data) is in RFC 2388 (copy at http://www.faqs.org/rfcs/rfc2388.html ). A quick example of how the body is structured for a multipart POST request is located at http://www.codeproject.com/KB/cs/multipart_request_C_.aspx I think supporting this feature should be our responsibility. The user should not need to deal with the intricacies of structuring the data according to the rules of a multipart form. It will be a source of errors in the client application. The user should simply provide a content type and corresponding stream and we should draft a proper request out of it. > Another thing that may be required is to change the multi-map > underlying implementation for HTTP to use a list of std::pair<>'s to > preserve ordering. I've read something about the order of occurrence > and possible merging of repeating HTTP Headers. > Some information about merging headers is located at http://httpd.apache.org/docs/2.2/mod/mod_headers.html With multi-line headers processing, I'm not sure if this is ever going to be a problem with HTTP -- I'm not sure of the HTTP spec requires that headers be a single line -- but I am a little worried about our lack of HTTP headers checking. Does anybody have experience with special headers that may span multiple lines? Or am I imagining things here? :D See section 4.2 - Message Headers of RFC 2616 ( http://www.faqs.org/rfcs/rfc2388.html ). Headers can span multiple lines. This would require a change in the processing of the headers. > One last thing which needs some scrutiny: maybe we should define a > User-Agent: header to identify cpp-netlib? :D > Maybe a default User-Agent header can be provided. Any other ideas? Divye -- An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup. H. L. Mencken (1880 - 1956) My official web site: http://people.iitr.ernet.in/shp/061305/ Webmaster: http://www.drkapoorsclinic.com Blog: http://divyekapoor.blogspot.com |