http - Win32 : What is the status of chunked encoding support in WinHttpReadData?

标签 http winapi winhttp chunked-encoding rfc2616

documentation for WinHttpReadData说,关于 HTTP's chunked transfer coding :

Starting in Windows Vista and Windows Server 2008, WinHttp enables applications to perform chunked transfer encoding on data sent to the server. When the Transfer-Encoding header is present on the WinHttp response, WinHttpReadData strips the chunking information before giving the data to the application.

谁能破译这个?


Q1 首先,此文本位于 WinHttpReadData 页面上,该页面用于...读取 HTTP 客户端应用程序中的数据,特别是响应数据。那么它说的是什么意思

Starting in Windows Vista and Windows Server 2008, WinHttp enables applications to perform chunked transfer encoding on data sent to the server.

WinHttpReadData 函数不用于发送到服务器的数据。在从服务器读取数据时使用。

咨询the doc for the WinHttpWriteData function , 用于将数据作为 HTTP 请求的一部分发送到服务器,但没有提及分块传输功能。


Q2 如果我弄清楚新的分块传输支持是什么,我如何获得该支持?它说它在 Vista 和 WS2008 上是新的.如果我编写一个在 WS2003 上运行并使用 WinHttpReadData 的应用程序并且它遇到分块响应或 WinHttpWriteData 并且它想要发送分块请求会怎样?

字里行间,该文档是否说我需要链接到 Vista 时代的 Windows SDK 或更高版本中的 WinHttp.lib,以便获得进行分块编码的能力?或者在 WS2003 上真的不可能吗?换句话说,使用此库进行分块传输的应用程序必须在指定的操作系统上运行吗?


这可能读起来像咆哮,但事实并非如此。我真的很想知道。

最佳答案

我的本​​地副本没有它,对我来说是个错误。分块包含在 this article 中,“传输编码 header ”部分。它应该是透明的,便于阅读。

关于http - Win32 : What is the status of chunked encoding support in WinHttpReadData?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2511929/

相关文章:

c# - 网络请求错误?

vba - Excel 2013 64 位 VBA : Clipboard API doesn't work

c++ - 在关闭程序之前等待 x 秒 C++

c++ - 从 WinHttp 中的响应设置 Cookie

c++ - 获取 winhttp.h 的推荐方法是什么?

Paypal 沙盒阻止 WinHTTP.WinHTTPRequest.5.1

angularjs - Protractor 测试 Angular $http 拦截器

java - 读取请求使服务器停止

android - 在 Android 应用程序中创建服务器

python - 来自 WinAPI 的 PIL 和位图