I am attempting to configure an Apache 2.4.25 (Debian 9.7) server to serve files via HTTP/2.
All HTML, CSS, JS and image files are being correctly served.
However, I am facing difficulties with larger files, for example a ZIP file that is 58 MB (60639199 b):
Downloading this file via HTTP/1.1 works exactly as expected. Here is an excerpt out of the Apache access log:
x.x.x.x - - [08/Feb/2019:08:11:05 +0100] "GET /img/document_scanner_samples.zip HTTP/1.1" 200 60752807 "-" "Wget/1.18 (linux-gnu)"
However, when downloading via HTTP/2, the following error is returned in Chrome:
Failed - network error
And in FireFox:
Here is an excerpt out of the Apache access log:
x.x.x.x - - [08/Feb/2019:08:02:08 +0100] "GET /img/document_scanner_samples.zip HTTP/2.0" 200 60639199 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
The Apache error logs do not contain any information from around the same time.
By clicking on the "resume" button in the web browser multiple times, it is possible to eventually download all 58 MB of the ZIP file.
It would seem that the ZIP file is being downloaded in chunks of almost 6 MB each time "resume" is clicked. Here are the file sizes from Chrome:
"Unconfirmed 149963.crdownload" 6282112 b "Unconfirmed 867419.crdownload" 12564224 b "Unconfirmed 121076.crdownload" 18846336 b "Unconfirmed 499937.crdownload" 25128448 b "Unconfirmed 249798.crdownload" 31410560 b "Unconfirmed 631305.crdownload" 37692672 b "Unconfirmed 871992.crdownload" 43974784 b
Could anyone offer an explanation of what is going on here?
And make some suggestions on how I can fix the problem?
UPDATE: Tests results using curl 7.64.0.
Using curl with HTTP2 support, I could download the ZIP files via HTTP/1.1 and HTTP2 correctly.
I used the following commands:
/usr/local/bin/curl -vs --http1.1 -o via_http_1_1.zip https://www.scan2docx.com/img/document_scanner_samples.zip &> /dev/stdout | tee -a via_http_1_1.txt /usr/local/bin/curl -vs --http2 -o via_http_2.zip https://www.scan2docx.com/img/document_scanner_samples.zip &> /dev/stdout | tee -a via_http_2.txt
The entries in the Apache access.log are as follows:
x.x.x.x - - [08/Feb/2019:12:37:24 +0100] "GET /img/document_scanner_samples.zip HTTP/1.1" 200 60752588 "-" "curl/7.64.0" x.x.x.x - - [08/Feb/2019:12:37:37 +0100] "GET /img/document_scanner_samples.zip HTTP/2.0" 200 60639199 "-" "curl/7.64.0"
The downloaded ZIP files are as follows:
-rw-r--r-- 1 x x 60639199 Feb 8 12:37 via_http_1_1.zip -rw-r--r-- 1 x x 60639199 Feb 8 12:37 via_http_2.zip
HTTP/1.1 log file: https://www.scan2docx.com/img/via_http_1_1.txt
HTTP/2 log file: https://www.scan2docx.com/img/via_http_2.txt
However, in web browsers, all operating systems, the downloads continue to fail.