开发者

416 Requested Range Not Satisfiable

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 se开发者_运维知识库rver (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?


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.


I have, at the top of my .htaccess file

Header set Accept-Ranges none
RequestHeader unset Range 

hope this helps.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜