[Varnish] #1098: Return HTTP 416 for unsatisfiable byte-range requests
Varnish
varnish-bugs at varnish-cache.org
Fri Feb 24 17:22:47 CET 2012
#1098: Return HTTP 416 for unsatisfiable byte-range requests
----------------------+-----------------------------------------------------
Reporter: jmeacham | Type: enhancement
Status: new | Priority: normal
Milestone: | Component: build
Version: 3.0.2 | Severity: normal
Keywords: |
----------------------+-----------------------------------------------------
Please consider returning HTTP 416 for unsatisfiable byte-range requests
(as recommended in section 10.4.17 of RFC 2616) rather than returning the
entire object with HTTP 200.
I understand that this is not a required in the HTTP 1.1 spec. However, I
believe that implementing this 'proper' behavior would be of value, given
the increased usage of byte-range requests in multimedia streaming
applications. Thank you for your consideration and your continued work.
Example requests to Varnish and backend storage for unsatisfiable ranges
are included below.
Request to Varnish cache:
$curl -o /dev/null -s -H 'Range: bytes=1234567-'
http://cache001.dc2/11001/index.html
10.20.31.179 - - [24/Feb/2012:16:12:54 +0000] "GET
http://cache001.dc2/11001/index.html HTTP/1.1" 200 109 "-" "curl/7.24.0
(x86_64-apple-darwin11.2.0) libcurl/7.24.0 OpenSSL/1.0.0g zlib/1.2.6
libidn/1.22"
Request to backend storage:
$ curl -s -H 'Range: bytes=1234567-' http://cfs001-1.af1/11001/index.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>416 Requested Range Not Satisfiable</title>
</head><body>
<h1>Requested Range Not Satisfiable</h1>
<p>None of the range-specifier values in the Range
request-header field overlap the current extent
of the selected resource.</p>
</body></html>
10.20.31.179 - - [24/Feb/2012:16:14:16 +0000] "GET /11001/index.html
HTTP/1.1" 416 314 "-" "curl/7.24.0 (x86_64-apple-darwin11.2.0)
libcurl/7.24.0 OpenSSL/1.0.0g zlib/1.2.6 libidn/1.22"
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1098>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list