416 Requested Range Not Satisfiable

Lynn picture Lynn · May 5, 2011 · Viewed 41.8k times · Source

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?

Answer

cmbuckley picture cmbuckley · May 5, 2011

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.