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

发布于 2024-09-26 16:32:00 字数 684 浏览 4 评论 0原文

我们最近在 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 技术交流群。

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

发布评论

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

评论(2

雄赳赳气昂昂 2024-10-03 16:32:00

我可以解决这个问题。 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.

烂柯人 2024-10-03 16:32:00

放弃 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.

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