nginx Gzip file download not working
francis at daoine.org
Mon May 14 22:21:27 UTC 2012
On Sun, May 13, 2012 at 04:19:26AM -0400, pralive wrote:
> When i try to download a file using "curl -H "Accept-Encoding: gzip"
> http://abc.com/xx.epub" ,almost 99% file downloads and then it hangs and
> end up with this message "curl: (18) transfer closed with 2693 bytes
> remaining to read".
Can you set up a test system, and find a minimum configuration that
shows the problem you are seeing?
> Please help.Do i need to change anything in server
> side to make this work?
The reason I ask, is: with this gzip-related configuration, and the rest
being defaults, I don't think that the gzip handler is involved here.
When I try the following test:
# create my test file
perl -e 'print "1234567890" x 111' > html/xx.epub
Then I can run the curl commands to get the file:
curl -I http://localhost:8000/xx.epub
curl -I -H 'Accept-Encoding: gzip' http://localhost:8000/xx.epub
and they show the same response.
If I add the line
to nginx.conf and reload, then the plain curl shows me
while the gzip one shows
So: I'm unable to replicate the problem you report; and it doesn't
immediately seem related to gzip.
Can you provide a replication recipe that someone else could run to see
the same problem?
Do you see the problem with any other file? Or with the same file on a
Also, the output of "nginx -V" and the logs, are likely to be useful.
Good luck with it,
Francis Daly francis at daoine.org
More information about the nginx