0

在我们的 VB6 应用程序中,我们使用 vbmhwb.dll 并通过网络下载文件。文件被正确下载,但它返回不同的 Content-Length 值。我发现 HTTP 标头具有不同的 Content-Encoding。以下是同一文件在不同 PC 上的 HTTP 标头。下载后文件是二进制相同的。那么什么时候设置 Content-Encoding 呢?另外,如何从标题中获取文件的实际大小?

文件 1:

HTTP/1.0 200 OK
Date: Fri, 11 Apr 2014 09:19:15 GMT
Server: Application Server
Content-Disposition: attachment; filename=ABC.csi
Content-Type: text/plain
Content-Length: 671
Connection: close

文件 2:

HTTP/1.0 200 OK
Date: Fri, 11 Apr 2014 10:28:06 GMT
Server: Application Server
Content-Disposition: attachment; filename=ABC.csi
Content-Type: text/plain
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 416
Connection: close
4

0 回答 0