Re: File upload in HTML forms

Christian L. Mogensen (mogens@CS.Stanford.EDU)
Mon, 26 Sep 1994 11:22:03 -0700 (PDT)


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)