gpt4 book ai didi

header - X-Pad : avoid browser bug header added by apache

转载 作者:行者123 更新时间:2023-12-02 04:29:09 24 4
gpt4 key购买 nike

我看到这个 header 附加到来自 apache 的响应中。它对于新时代的浏览器有什么意义吗?或者它只是为了规避旧版本 Netscape 中的错误。看起来很奇怪。

编辑

我正在对我们的应用程序进行性能测试,当我在 Jmeter 响应文本中看到时,有一个奇怪的 header 返回。它说:

X-pad: avoid browser bug

就是这样!所以我尝试了一些谷歌搜索,它似乎是为 Netscape 浏览器的错误添加的 header 。不管怎样,我仍然很好奇,既然我们距离那些版本的浏览器还很远(谢天谢地),是否有充分的理由让它仍然存在。我们使用apache2。

希望这些详细信息有所帮助。

干杯

最佳答案

不,现在它是一个残留的标题;也就是说,它被放置在那里是为了解决已过时的浏览器中的错误(比 IE6 早几代 - 据报告该错误在 1997 年即 15 年前已被修复!)并且没有人再使用它了。 p>

The patch to remove it 自 2008 年起就出现在 Apache 的 SVN 中,但显然它尚未传播到所有发行版(另外一些站点可能使用 Apache 的未更新版本)。

这是标题的评论,摘自from the source:

/* Navigator versions 2.x, 3.x and 4.0 betas up to and including 4.0b2
* have a header parsing bug. If the terminating \r\n occur starting
* at offset 256, 257 or 258 of output then it will not properly parse
* the headers. Curiously it doesn't exhibit this problem at 512, 513.
* We are guessing that this is because their initial read of a new request
* uses a 256 byte buffer, and subsequent reads use a larger buffer.
* So the problem might exist at different offsets as well.
*
* This should also work on keepalive connections assuming they use the
* same small buffer for the first read of each new request.
*
* At any rate, we check the bytes written so far and, if we are about to
* tickle the bug, we instead insert a bogus padding header. Since the bug
* manifests as a broken image in Navigator, users blame the server. :(
* It is more expensive to check the User-Agent than it is to just add the
* bytes, so we haven't used the BrowserMatch feature here.
*/

关于header - X-Pad : avoid browser bug header added by apache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8711584/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com