Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a very strange problem with my apache server (v2.2.16 running on debian 6.0.5). I have mod_deflate enabled to serve content gzipped, and in chrome, firefox and ie, it works just fine, no problem. However, in Safari, only partial content is received and unpacked.

Another thing to note: there is an Nginx server in front of the Apache, proxying content - so the request will hit nginx, be proxied to apache, then answer returned to nginx, then it's sent back. However, the Apache server does the gzipping - gzipping has been switched off on the nginx server.

The page is http://www.fastaval.dk/aktiviteter/rollespil/

The same problem presents itself when trying to test the page with W3Cs validator: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fastaval.dk%2Faktiviteter%2Frollespil%2F&charset=%28detect+automatically%29&doctype=Inline&group=0 This is also broken and suggests that the gzipped content is somehow broken.

However, if I try to just download the gzipped file to manually unpack with gunzip, I get a perfectly valid gzip file. I've tried both using wget and curl - both output a valid file, no problems.

Short of disabling mod_deflate for Safari, how can I troubleshoot this issue? And what might cause this problem?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It will depend on a number of factors.

Chunked content-transfer does not send a Content-Length: header so the proxy would have to receive the entire file before it can know the size. This may interfere with clients in various ways, as seems to be the case with your Safari tests.

I would advise you to tcpdump some of the traffic, and see if there are differences between, say, Safari and FF, header-wise.

If it seems to be purely on the client side, i.e. how Safari interprets the content, then you may have to add a BrowserMatch or two to skip deflate for that client.

share|improve this answer
    
I'm marking this as the answer, as it most likely is. I have not ascertained the actual reason for the problem though - instead I've switched nginx out in favor of Varnish, which has solved the problem. –  Fake51 Jan 14 '13 at 21:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.