有没有办法访问 .Net 4.0 中分块编码响应中的预告片标头?

发布于 2024-09-30 18:32:37 字数 198 浏览 1 评论 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 技术交流群。

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

发布评论

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

评论(1

帥小哥 2024-10-07 18:32:37

我不认为有什么办法可以做到这一点。至于为什么会这样,当这个功能第一次被实现时,没有已知的 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).

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