IIS ISAPI 扩展 +如何修改HTTP响应体
在 IIS6 上,我知道 ISAPI 过滤器可以轻松做到这一点,但我试图在 ISAPI 扩展中做同样的事情。
我想让 IIS 处理请求,但能够在响应中附加一些字符串。
是否有回调可以让我在发送 http 响应之前修改它?
如:
客户端请求:index.html ISAPI 扩展被调用,并将请求转发到 IIS:HSE_REQ_EXEC_URL ISAPI 扩展被再次调用,并带有响应,修改它并发送它。
只是似乎找不到任何 ServerSupportFunction 可以做到这一点:(
谢谢
On IIS6, I know ISAPI filter can easily do this, but I am trying to do the same in an ISAPI Extension.
I would like to let IIS handle a request, but be able to Append some string to the response.
Is there a callback that would let me modify the http response before it's sent?
Such as:
Client request: index.html
ISAPI extension gets called, and forward the request to IIS with: HSE_REQ_EXEC_URL
ISAPI entension gets called again, with the response, modify it, and send it.
Just can't seem to find any ServerSupportFunction that does that :(
Thanks you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能。您需要使用输出(send_raw_data)过滤器。
好吧,有一种偷偷摸摸的方法来模拟这个,但它有性能影响 - 您可以使用 winhttp 或其他东西手动从服务器请求文档。不过,需要大量代码才能正确执行。
You can't. You need to use an output (send_raw_data) filter.
Well, OK, there's a sneaky way to simulate this, but it has perf implications - you can manually request the document from the server using winhttp or something. Tons of code to get it right, though.