如何更新 Http 请求并将其发送到另一个 Web 服务器

发布于 2024-09-14 19:37:26 字数 330 浏览 13 评论 0原文

以下是我们的环境设置:

IIS 7 接收来自客户端(浏览器)的 Http (.jsp) 请求。 它使用 ISAPI_Redirect.dll 盲目地将其重定向到 JBoss。

现在我们尝试修改此设置,以便在 IIS7/ISAPI_redirect 将其发送到 JBoss 之前,我们需要使用 Http 模块修改已发布的表单数据。这个http模块是普通的.net http模块。

我们能够拦截http模块的请求@BeginRequest事件,当我们将其发送到JBoss时,它会给我们“Read client failed (400)”错误。

知道如何完成这项任务或解决手头的问题吗?

Following is our environment setup:

IIS 7 receives Http (.jsp) request from client (browser).
It blindly redirects it to JBoss using ISAPI_Redirect.dll.

Now we are trying to modify this setup in such a way that before IIS7/ISAPI_redirect sends it to JBoss, we need to modify posted form data using Http module. This http module is normal .net http module.

We are able to intercept the request @ BeginRequest event of http module and when we send it to JBoss, it gives us "Read client failed (400)" error.

Any idea how to achieve this task or fix the problem at hand?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

迷荒 2024-09-21 19:37:26

我们无法以原始形式解决问题。我们所做的就是从原始管道中删除 ISAPI_REDIRECT/JBoss。

现在,我们通过设置另一个未配置 ISAPI_Redirect 的虚拟目录,将请求直接发送到我们的 http 模块,我们进行修改(之前我们打算在 JBoss 收到请求后执行此操作),然后将其发送到另一个虚拟目录(URL ) 其中配置了 ISAPI_REDIRECT。现在 ISAPI_Redirect 捕获请求,将其映射为 JBoss 格式并将其发送到 JBoss。

基本上,我们改变了客户处理的地点,事情似乎就位了。

We were not able to fix our problem in its original form. What we did is we removed ISAPI_REDIRECT/JBoss from our original pipeline.

We now take the request directly to our http module by setting up another virtual directory where ISAPI_Redirect is not configured, we do our modification (earlier we intended to do this after JBoss has received the request) and then send it to another virtual directory (URL) where ISAPI_REDIRECT is configured. Now ISAPI_Redirect captures the request, maps it to JBoss format and sends it to JBoss.

Basically we switched the place of our customer processing and things seem to falling in place.

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