isapi 重定向器未正确处理 Tomcat 和 IIS 7.0 之间的重定向状态代码 302
我们最近在 Tomcat 6 下安装了一个 Web 应用程序,该应用程序通过 isapi 重定向器接口进行连接(请参阅 http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html)到 IIS 7 服务器。连接器在每种情况下都能正常工作,但 Web 应用程序中的某些页面返回状态 302 并具有要重定向的新位置。
浏览器返回 302 并请求新位置,但 IIS Web 服务器不会将请求转发到 Tomcat 服务器,而是返回 404 错误,即使 uri 工作映射对我来说看起来是正确的。
相应的 uri 工作规则为:
/WebClientServlet/*=worker1
,新位置的位置 url 如下所示:
http://localhost/WebClientServlet/SBS/cmd:editContent2/工作流程:假/articleSearch:假/确认:假/objectID:131294/---/fpse/db:test/objectID:131294/Copy+of+0001-Intranet+Home-main-ip+%28DE%29
We recently installed a web application under Tomcat 6 which is connected over the isapi redirector interface (see http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html) to an IIS 7 server. The connector works properly in every case, except for some pages in the web application that return a status 302, with a new location to redirect for.
The browser gets the 302 back and requests the new location, but the IIS web server does not forward the request to the Tomcat server and returns a 404 error instead, even though the uri worker map looks correct for me.
The corresponding uri worker rule is:
/WebClientServlet/*=worker1
and the location url of the new location looks like the following:
http://localhost/WebClientServlet/SBS/cmd:editContent2/workflow:false/articleSearch:false/confirmed:false/objectID:131294/---/fpse/db:test/objectID:131294/Copy+of+0001-Intranet+Home-main-ip+%28DE%29
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我可以解决这个问题。 HTTP 状态代码实际上是 404.11,这意味着(在 IIS 7 下)不允许双重转义序列。 IIS 7 中引入了一项新功能,称为双重转义 URL 过滤。它是一个默认的安全过滤器,拒绝加载任何包含双转义序列的 URL。为了解决该问题,请关闭用于通过 isapi-redirector 访问 tomcat 应用程序的网站的功能。请参阅 http://www.iis.net/ConfigReference/system.webServer/ 下的更多信息安全/请求过滤。
I could solve the problem. The HTTP status code was actually a 404.11, which means (under IIS 7) that double escaped sequences are not allowed. There is a new feature introduced in IIS 7 called double escaped URL filtering. It is a default security filter, which denies to load any URL that contain double escaped sequences. In order to solve the problem, switch the feature off for the web site which is used to access the tomcat application over isapi-redirector. See more under http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering.
放弃 ISAPI 重定向器。直到今天我一直在使用它。查看 IIS7 的应用程序请求路由。 此处介绍了如何设置它。如果您想使用主机标头,请查看 在这里。
Ditch the ISAPI redirector. Up until today it is what I have been using. Check out the Application Request Routing for IIS7. Here is a walk through on how to set it up. If you want to use host headers look here.