2012-03-19 131 views
3

我正在爲視頻文件設置視頻傳輸到電視機頂盒。 我想使用Amazon Cloudfront。 視頻文件像往常一樣請求HTTP請求,它可能包含一個範圍頭部以請求部分資源(使盒子上的用戶跳轉到視頻內的任何位置)。使用HTTP 1.0響應迴應HTTP 1.1請求有效嗎?

我的問題是,它正在對3個盒子中的2個進行操作,其中一個出現問題。

請求看起來像這樣(樣本數據):

GET /path/file.mp4 HTTP/1.1 
User-Agent: My User Agent 
Host:myhost.com 
Accept:*/* 
Range: bytes=100-200 

所以,如果我做的請求使用telnet我看到,該響應是HTTP 1.0到CloudFront的:

[email protected]:~$ telnet d2zf9fl0izzsf6.cloudfront.net 80 
Trying 216.137.61.164... 
Connected to d2zf9fl0izzsf6.cloudfront.net. 
Escape character is '^]'. 
GET /skin/frontend/default/flimmit/images/headerbanners/02_green.png HTTP/1.1 
User-Agent: My User Agent 
Host:d2zf9fl0izzsf6.cloudfront.net 
Accept:*/* 
Range: bytes=100-200 

HTTP/1.0 206 Partial Content 
Date: Sun, 12 Feb 2012 18:42:15 GMT 
Server: Apache/2.2.16 (Ubuntu) 
Last-Modified: Tue, 26 Jul 2011 10:37:54 GMT 
ETag: "1e0b8a-2d2b-4a8f6863ac11a" 
Accept-Ranges: bytes 
Cache-Control: max-age=2592000 
Expires: Tue, 13 Mar 2012 18:42:15 GMT 
Content-Type: image/png 
Age: 351213 
Content-Range: bytes 100-200/11563 
Content-Length: 101 
X-Cache: Hit from cloudfront 
X-Amz-Cf-Id: W2fzPeBSWb8_Ha_UzvIepZH-Z9xibXyRddoHslJZ3TDXyFfjwE3UMQ==,CwiKc8-JGfE77KBVTTOyE9g-OYf7P-bCJZEWGwef9Es5rzhUBYKE8A== 
Via: 1.0 972e3ba2f91fd0a38ea062d0cc03be37.cloudfront.net (CloudFront) 
Connection: close 

q�]#��ĥM�oӘ�i��i��������Y�.��/��ib���& 
��� 
�Ⱦ�00�>�����Y`��X���r���s�=�n�s�b���7MConnection closed by foreign host. 
[email protected]:~$ 

不幸的是我有隻有有限的訪問權限才能進行測試。 但是,雲端的這種行爲對我來說似乎很奇怪,所以我想問問它是否有效。

回答

3

用Http1.0回答Http 1.1請求是完全「有效」的。

我會引用RFC2068的附錄19.6「這是超出了協議規範的範圍,要求遵從先前的版本.HTTP/1.1是故意設計的,但是,使得支持以前的版本變得容易。

http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.6

的重要組成部分,基本上是在RFC不強制HTTP 1.1的答案,所以它的服務器。

+0

這是否有任何安全隱患?從安全的角度來看,這可能會被濫用嗎? – acudars 2015-03-25 11:53:32