416 请求的范围无法满足
背景:我正在使用一个名为“社交引擎”的软件包。这是非常有缺陷的。
不管怎样,我要求(甚至付费)社交引擎人员进行升级,当他们最终这样做时,我登录到该网站,发现样式全部丢失了。我开了一张支持票,他们只告诉我这是一个 416 错误并联系我的 ISP。
通过测试位于软件可写文件夹中的 CSS 文件的直接链接发现了此错误。
我开始做我的研究只是为了发现这是一个极其罕见的错误,我在 Ubuntu 10.10 Linode 服务器(运行最新的 Apache 和 PHP5,安装了 APC 扩展)上看不到任何关闭范围请求的建议。也许是软件问题? APC 的缓存是否有效?我将此软件中的缓存重置为 60 秒,并确保它使用 APC。还是没有骰子。
他们的软件可能正在做一些我需要研究修补的事情吗?
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.
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
该问题可能是由于您的浏览器缓存了原始 CSS 文件并尝试请求新文件的字节范围。例如,请参阅Chrome 的此错误。
至于禁用范围请求,如果您清除浏览器缓存,则可能没有必要,但如果您需要它,您可以尝试以下 Apache 配置:
这将告诉客户端他们无法使用
Range
请求请求文件字节范围的标头。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:
This will tell clients that they cannot use the
Range
request header to request byte ranges of your files.我在 .htaccess 文件的顶部
希望这会有所帮助。
I have, at the top of my .htaccess file
hope this helps.
拦截从 ISP 返回的标头并验证您是否收到 416 状态代码。如果是这样,拦截您发送给 ISP 的标头并删除范围标头;这会强制服务器向您发送整个文件。
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.