W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1999

RE: Problems with POST

From: <Linus.Walleij@ecs.ericsson.se>
Date: Fri, 05 Mar 1999 17:31:15 +0100
To: delagard@ssti.fr, www-lib@w3.org
Message-id: <81314DE3B27DD0119A7400609719CF4B04A47F9E@eseldnt100.ericsson.se>
Isabelle Delagarde wrote:

> I would like to POST data with format "a=b&c=d&..." followed by a MIME
> file : everything needs to be in the same request.

You should typically use the MIME transport encoding multipart/form-data in
accordance to RFC 1867 (I think it was). This transport encoding radically
(and beautifully) differs from the usual x-www-urlencoded
(this=that&such=encoded+spaces+and+stuff). The problem is, you have to
encode it in your client application, and you have to decode it in your
server application. Many servers have API:s or addons for doing this (such
as the upload COM objects for IIS, plugins for Apache etc).

All popular web browser clients does the trick, and libwww can do the server
decoding (as told by Henrik F at må 1999-01-25): 

> If you use one of the libwww profiles then you will get a MIME multipart
> parser for all multipart/* types. This is registered in 
>
>	http://www.w3.org/Library/src/HTInit.c
>
> in HTConverInit(), and you can find the MM parser in
>
>	http://www.w3.org/Library/src/HTBound.c
>
> The "range" sample program uses this to parse multipart/byteranges when
> issuing a request with multiple ranges:
>
>	http://www.w3.org/Library/Examples/range.c
>
> linked from
>
>	http://www.w3.org/Library/Examples/
>
> MM generation is not quite there - it depends on the hack that I am
working
> on for handling PUT and POST in small pieces. I hope to have that done in
a
> week or so.

If that MM generation is there now, you should also be able to construct
client calls with libwww. What do you say, Henrik?

Linus Walleij
Received on Friday, 5 March 1999 11:35:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:29 GMT