HTTP PUT for file uploads

mike mike503 at
Tue Sep 9 01:12:30 MSD 2008

On Sat, Sep 6, 2008 at 4:45 AM, Valery Kholodkov
<valery+nginxen at> wrote:

> 1) multipart/form-data does not bloat the size of the file, it doesn't
> encode anything. rfc 1867 doesn't explicitly say that there any encoding
> should be applied;
> 2) the ideal solution is to have byte ranges instead of Segment ID, since
> concatenation of parts is not a _scalable operation_. With byte ranges the
> server will be able to put the part into the proper place in the file, while
> leaving other parts empty. I.e. if I have two parts
> with byte ranges 0-19999/80000 and 40000-59999/80000, I can lseek to the
> second part and start writing two parts simultaneously:
> |<-- part1 0-19999/80000 -->|<-- zeroes 000000 -->|<-- part2
> 40000-59999/80000 -->|

Does anyone know what would be easiest to add in to nginx? I assume
most would require external libraries and I would like to keep nginx's
footprint low and not require an excessive amount of external

The idea here would be the client encodes using one of these, and the
server will decode, to ensure safe transfer of the file (please let me
know Valery if you think this is totally not needed, I expect every
segment to be checksummed anyway, so maybe it doesn't need to be)

base64 encoding/decoding
yenc (
? any other encoding methods ?

More information about the nginx mailing list