Re: File upload in HTML forms

wmperry@spry.com
Tue, 27 Sep 1994 03:45:14 +0100

Christian L. Mogensen writes:
> wmperry@spry.com writes:
>
> > The basic format is:
> > POST /cgi-bin/foobar HTTP/1.0
> > [more http headers]
> > Content-type: multipart/x-www-form-data;
> > separator=-some-separator-for-www-form-data
> > ---some-separator-for-www-form-data
> > Content-id: NAME of form <input> tag
>
> > the raw form data for the specific <input> tag
>
> > ---some-separator-for-www-form-data
> > Content-id: next NAME
> > raw form data
>
>
> Wouldn't this benefit from the Content-length instead of separators?
> Especially since the browser knows the lengths of all items before
> submission. i.e:
>
> Content-type: multipart/x-www-form-data
>
> Content-id: Name
> Content-length: 8
> Raw Data
> Content-id: AnotherName
> Content-length: 15
> More Raw Data
>
> Content-id: etc etc...
> (ie: the last CRLF is not included in the data)

I think you need both in a multipart message, don't you? Forgot to put
in the content-length in my example code - will change that this afternoon.

-Bill P.