问题
Context: I am using a software package called Social Engine. It is extremely buggy.
Anyway, I asked (paid even) the Social Engine people to do an upgrade and when they finally did so, I logged into the site and noticed that the styles were all missing. I opened a support ticket and all they told me was that it was a 416 error and to contact my ISP.
This error was found by testing the direct link to the CSS files which are located in a writable folder in the software.
http://ministersdev3.themonastery.org/application/css.php?request=application/themes/monastery-theme/theme.css&c=6
I started doing my research only to find it's an extremely rare error and I couldn't see any suggestions for turning range requesting off on my Ubuntu 10.10 Linode server (running latest Apache and PHP5 with APC extension installed). Perhaps it's a software issue? Someway the caching with APC is working? I reset the caching in this software to 60 seconds and made sure it was using APC. Still no dice.
Is it something their software may be doing that I would need to look into patching?
回答1:
The issue could be due to your browser having cached the original CSS files and trying to request byte ranges of the new files. See for example this bug with Chrome.
As far as disabling range requesting, it might not be necessary if you clear your browser cache, but if you need it you could try the following Apache config:
Header unset Accept-Ranges
This will tell clients that they cannot use the Range
request header to request byte ranges of your files.
回答2:
I have, at the top of my .htaccess file
Header set Accept-Ranges none
RequestHeader unset Range
hope this helps.
回答3:
Intercept the headers coming back from your ISP and verify that you're getting a 416 status code. If so, intercept the headers you are sending to your ISP and drop the range header; this should force the server to send you the entire file.
来源:https://stackoverflow.com/questions/5891431/416-requested-range-not-satisfiable