some questions about the upload module

Valery Kholodkov valery+nginxen at
Tue Sep 9 19:04:26 MSD 2008


> Since I'm writing a multipart form data parser for my WSGI framework:
> I would like to ask a few questions about the upload module.
> * There is some external documentation for the module?

No, there is no developer documentation. At the moment I see no reason for
it to exist. I rarely document code and always keep all my projects in

>    For the example in the source, how is the request body passed to the
>    PHP application encoded?
> * I see from the source that the accepted Content-Disposition values are
>    form-data and attachment.
>    But rfc2388 requires only form-data; why is attachment supported?

As far as I remember Netscape and some old IEs did send "attachment",
probably according to rfc 1806.

> * In case of multiple file fields with the same name, the UA should use
>    multipart/mixed content type, but this is not supported by the module,
>    I'm right?

Correct. I neither have seen any multipart/mixed in POST request nor know
what to do with it.

>    By the way, since rfc2388 does not defines what happens when multiple
>    normal fields with the same are defined, I think I will not add
>    support to multipart/mixed, too.
> * As per rfc2388, each part can have a content-transfer-encoding,
>    but as far as I can see, this is not supported by the upload module.
>    Does every know browser always use a 7bit/8bit/binary transfer
>    encoding?

Theoretically they can do something other than binary, but I haven't seen
such browser.

Best regards,
Valery Kholodkov

More information about the nginx mailing list