如何将 ISAPI 扩展中的请求链接到 ISAPI 过滤器中的响应?
我正在为 IIS6 构建一个 http 嗅探器,为此我同时使用 ISAPI 过滤器和 ISAPI 扩展。 扩展 - 读取请求。 过滤器 - 读取响应。
我使用扩展的原因是我不想强制用户更改为 IIS5 兼容模式,因此无法订阅 SF_NOTIFY_READ_RAW_DATA。
问题是,当我读取响应时,我想将其链接到请求,因此我需要为请求提供唯一标识符,并在读取响应时使用它。
我读过,曾经有一个选项可以使用 SF_REQ_GET_CONNID 调用 ServerSupportFunction,但 IIS6 不支持该选项。
我还读到,一个可能的解决方案是附加客户标头,然后将其删除 - 这可能会起作用,但似乎没有我希望实现的那么优雅。
有没有办法获取过滤器中的连接ID(EXTENSION_CONTROL_BLOCK中的connID)?
感谢您的回复, 萨吉夫
I'm building sort of a http sniffer for IIS6, for that I'm using both ISAPI filter and ISAPI extension.
Extension - to read the request.
Filter - to read the response.
The reason i'm using extension is that I don't want to force the user to change to IIS5 Compatibility Mode and therefore can't subscribe to SF_NOTIFY_READ_RAW_DATA.
The thing is, when I read the response, I want to link it to the request, so I need to give a unique identifier to the request, and use it when reading the response.
I have read that there used to be an option to call ServerSupportFunction with SF_REQ_GET_CONNID, but that's not supported in IIS6.
Also I have read that a possible solution is to append customer header and then remove it - that would probably work, but seems less elegant than I hoped to implement.
Is there any way to get the connection ID (connID in EXTENSION_CONTROL_BLOCK) in the filter?
appreciate your response,
Sagiv
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
几个月前我也遇到了同样的问题。
我执行了以下操作来解决该问题:
这样我就可以链接请求内容(来自扩展)和响应内容(来自过滤器)!
I had the same problem a few months ago.
I did the following to solve the problem:
This way I have both the request content (from the Extension) and the response content (from the filter) linked!