[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Demo "largepost.c" with a file about 6GB
From: |
Martin Bonner |
Subject: |
Re: [libmicrohttpd] Demo "largepost.c" with a file about 6GB |
Date: |
Tue, 29 Mar 2016 14:43:47 +0000 |
I was about to say ">64 bit is totally ridiculous", but actually, using 1
Petabit fibre (which has been demonstrated), assuming about 10bits per byte of
data (which is a typical sort of efficiency), it would only take just over a
couple of days to transfer more than 2**64 bytes of data.
In a decade or so, it'll probably be routine.
-----Ursprüngliche Nachricht-----
Von: address@hidden [mailto:address@hidden Im Auftrag von Christian Grothoff
Gesendet: Dienstag, 29. März 2016 08:33
An: address@hidden
Betreff: Re: [libmicrohttpd] Demo "largepost.c" with a file about 6GB
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
>