我们在webapp中使用Redirect-after-Post模式。
有时我们的apache日志中会显示很少的错误日志,如下所示:
[error] [...]客户端发送没有主机名的HTTP / 1.1请求(参见RFC2616第14.23节):...
在我的访问日志中,它们显示为 [...]“GET / xyz / HTTP / 1.1”400 226“ - ”“ - ”72
这里发生的是:应用程序发送一个带有绝对URL的重定向,如下所示:
地点:http://www.kicktipp.de/demo/
今天我有三个浏览器请求我们重定向的URL,而不需要主机头:
这些都是正常访问,用户点击几页,然后获得重定向,但失败并出错。
我知道有些旧浏览器需要http / 1.1的帮助,所以我们有默认的debian setenv配置:
<IfModule mod_setenvif.c>
#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
</IfModule>
每10000次重定向仅发生一次。但当然我想满足每个用户和每个浏览器。
你有什么暗示可以给我吗?是否需要在我们的mod_setenvif配置中添加更多浏览器?