简体   繁体   English

isapi重定向器未正确处理Tomcat和IIS 7.0之间的重定向状态代码302

[英]Redirect Status Code 302 between Tomcat and IIS 7.0 is not properly handled by the isapi redirector

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. 我们最近在Tomcat 6下安装了一个Web应用程序,该应用程序通过isapi重定向器接口(请参阅http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html )连接到IIS 7服务器。 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. 连接器在每种情况下均能正常工作,除了Web应用程序中的某些页面返回状态302以及要重定向的新位置之外。

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. 浏览器将302取回并请求新的位置,但是IIS Web服务器不会将请求转发到Tomcat服务器,而是返回404错误,即使uri worker map对我来说正确。

The corresponding uri worker rule is: 相应的uri工人规则是:

/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

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. HTTP状态代码实际上是404.11,这意味着(在IIS 7下)不允许双转义序列。 There is a new feature introduced in IIS 7 called double escaped URL filtering. IIS 7中引入了一项称为双重转义URL过滤的新功能。 It is a default security filter, which denies to load any URL that contain double escaped sequences. 它是默认的安全筛选器,它拒绝加载任何包含双转义序列的URL。 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. 为了解决该问题,请关闭用于通过isapi-redirector访问tomcat应用程序的网站的功能。 See more under http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering . 请参阅http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering下的更多内容。

Ditch the ISAPI redirector. 抛弃ISAPI重定向器。 Up until today it is what I have been using. 直到今天,这是我一直在使用的。 Check out the Application Request Routing for IIS7. 签出IIS7的应用程序请求路由 Here is a walk through on how to set it up. 是有关如何进行设置的逐步指导。 If you want to use host headers look here . 如果您想使用主机头,请看这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM