Ubuntu One 是否支持 Content-Range?

Ubuntu One 是否支持 Content-Range?

使用 Ubuntu One 的云 API,我尝试仅下载文件的前 144 个字节,使用Range: bytes=0-143我的请求的 HTTP 标头中的指令。

作为响应,我收到以下 HTTP 标头(以及状态代码 206,又名“部分内容”):

Content-Disposition: inline; filename=blah.txt
Date: Mon, 21 Jan 2013 23:30:06 GMT
X-Bzr-Revision-Number: 6696
Etag: "sha1:7f96fcfa002cf5791c976c46aaf733dc523d9041;gzip"
Content-Range: bytes 0-143/3909
Via: 1.0 calamansi.canonical.com:3128 (squid/2.7.STABLE7) 1.1 files.one.ubuntu.com
Content-Type: application/octet-stream
Vary: Accept-Encoding,Cookie
X-Cache: MISS from calamansi.canonical.com
Set-Cookie: sessionid=...; Domain=.one.ubuntu.com; httponly; Path=/; secure
Server: TwistedWeb/10.0.0
Last-Modified: Mon, 21 Jan 2013 23:17:05 GMT

因此,显然,根据我收到的标头,我得到了 144 个字节,这是我请求的。但是,正文是空的。还要注意Content-Length在响应的标头中不存在......

Ubuntu One 的响应标头是否欺骗了我,并且服务器实际上并不支持该Range指令?

答案1

一个错误被打开https://bugs.launchpad.net/ubuntuone-servers/+bug/1103136跟踪此事。将在那里跟进。

相关内容