有没有办法访问 .Net 4.0 中分块编码响应中的预告片标头?
使用 HttpWebRequest/Response,分块编码响应中的 Trailer 标头将被丢弃(我实际上已经浏览了 .Net 4.0 参考源,以了解它在最后一个块之后在何处调用 RemoveTrailers)。有什么方法可以检索这些标头吗?另外,有谁知道为什么会出现这种行为?
如果有人问,不,我无法确保预告片标题移动到其余标题。这就是我必须使用的数据流格式。
Using HttpWebRequest/Response, and the Trailer headers in the chunked-encoded response are being thrown away (I've actually stepped through the .Net 4.0 reference source to see where it calls RemoveTrailers after the final chunk). Is there any way to retrieve those headers? Also, does anyone know why this behavior is in place to begin with?
In case anyone asks, no, I can't ensure that the trailer headers are moved to the rest of the headers. This is simply the data stream format I have to work with.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为有什么办法可以做到这一点。至于为什么会这样,当这个功能第一次被实现时,没有已知的 HTTP 服务器在分块响应预告片中发送标头。
这是什么样的服务器?这是执行此操作的自定义服务器吗?
如果您绝对关心这一点,您可以在 MS connect 网站 (http://connect.microsoft.com) 上找到功能请求。
I dont think there is any way to do that. As to why it is like this, when this feature was first being implemented, there was no known HTTP server that sent headers in chunked response trailers.
What kind of server is this? Is this a custom server that is doing this?
If you absolutely care about this, you can find a feature request at the MS connect website (http://connect.microsoft.com).