有没有有效的方法来提取http请求的多部分范围响应?

发布于 2024-07-13 05:16:21 字数 500 浏览 3 评论 0原文

我正在使用 WinHttp.lib 进行一些http请求,

同时使用 Range 标头获取数据,例如

“GET someURL\r\n Range: bytes=4096-8191,0-4095”,

在响应标头后收到响应数据,如下所示(根据 RFC2616):

==================================

--46228a661764c4210

内容类型:文本/纯文本

内容范围:字节 4096-8191/14065

...Rang#1 的内容数据

--46228a661764c4210

内容类型:text/plain

内容范围:字节 0-4095/14065

...Rang#2 的内容数据

--46228a661764c4210--

那么,当数据作为流接收时,是否有任何有效的方法来提取我确切期望的每个范围的内容数据。

I am doing some http request with WinHttp.lib,

while Get data with Range header, such as

"GET someURL\r\n Range: bytes=4096-8191,0-4095",

received the respone data after response header like this(according to RFC2616):

================================

--46228a661764c4210

Content-type: text/plain

Content-range: bytes 4096-8191/14065

...Content Data of Rang#1

--46228a661764c4210

Content-type: text/plain

Content-range: bytes 0-4095/14065

...Content Data of Rang#2

--46228a661764c4210--

Then ,is there any efficient way to extract the Content Data that i exactly expected of each range,while data's received as stream.

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

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

发布评论

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

评论(1

-黛色若梦 2024-07-20 05:16:21

您尝试过 Fiddler 吗?

Have you tried Fiddler?

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