libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Demo "largepost.c" with a file about 6GB


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Demo "largepost.c" with a file about 6GB
Date: Tue, 29 Mar 2016 08:32:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0

Hi Silvio,

I just tried a 4699722540 byte file with both Firefox and Chrome on
GNU/Linux using 'largepost.c', and it worked without a problem.

If you've compiled your own custom application, make sure you've enabled
large file support for your disk IO.  That said, I've not (recently?)
tested this on a 32-bit system. Still, MHD should handle large files
like this.

As far as file limits are concerned, the MHD_PostDataIterator is limited
to 2^64-1 bytes. MHD itself has no limit as it has no concept of files
and treats requests as a possibly infinite stream of data. However, this
requires that the client does NOT set "Content-Length" (but use chunked
encoding). If "Content-Length" is present, the limit is again 2^64-1.
Note that technically HTTP doesn't impose the 64-bit limit on HTTP, but
I'm not aware of any HTTP client or server supporting > 64-bit values here.


Happy hacking!

Christian

On 03/29/2016 04:33 AM, silvioprog wrote:
> Hello,
> 
> I'm using the demo `largepost.c` to try to receive a file about 6 GB, but I
> always get the "ERR_CONNECTION_ABORTED" error in my Chrome, and MHD
> receives only ~4.1 GB. I tried the same test in Firefox, same problem, it
> send only ~4.1 GB.
> 
> I noticed that the upload progress stays a long time in 99%, so the browser
> disconnect from sever (timeout?).
> 
> What is the maximum upload size that MHD support?
> 
> Thank you!
> 
> --
> Silvio Cl├ęcio
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]