416 请求的范围无法满足

发布于 2024-11-05 10:29:03 字数 658 浏览 4 评论 0原文

背景:我正在使用一个名为“社交引擎”的软件包。这是非常有缺陷的。

不管怎样,我要求(甚至付费)社交引擎人员进行升级,当他们最终这样做时,我登录到该网站,发现样式全部丢失了。我开了一张支持票,他们只告诉我这是一个 416 错误并联系我的 ISP。

通过测试位于软件可写文件夹中的 CSS 文件的直接链接发现了此错误。

http://ministersdev3 .themonastery.org/application/css.php?request=application/themes/monastery-theme/theme.css&c=6

我开始做我的研究只是为了发现这是一个极其罕见的错误,我在 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.

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

好听的两个字的网名 2024-11-12 10:29:03

该问题可能是由于您的浏览器缓存了原始 CSS 文件并尝试请求新文件的字节范围。例如,请参阅Chrome 的此错误

至于禁用范围请求,如果您清除浏览器缓存,则可能没有必要,但如果您需要它,您可以尝试以下 Apache 配置:

Header unset Accept-Ranges

这将告诉客户端他们无法使用 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:

Header unset Accept-Ranges

This will tell clients that they cannot use the Range request header to request byte ranges of your files.

つ可否回来 2024-11-12 10:29:03

我在 .htaccess 文件的顶部

Header set Accept-Ranges none
RequestHeader unset Range 

希望这会有所帮助。

I have, at the top of my .htaccess file

Header set Accept-Ranges none
RequestHeader unset Range 

hope this helps.

相思故 2024-11-12 10:29:03

拦截从 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文