From: David Wolever Date: Tue, 21 May 2013 04:40:50 +0000 (-0400) Subject: Note about conditional return of HTTP 206 X-Git-Tag: v3.1.0~56^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1adcaf01f987cefde8230c3f5934d2aba8d4183;p=thirdparty%2Ftornado.git Note about conditional return of HTTP 206 --- diff --git a/tornado/web.py b/tornado/web.py index 51c652c3e..bbf68d05c 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -1810,6 +1810,10 @@ class StaticFileHandler(RequestHandler): size = self.get_content_size() if start < 0: start += size + # Note: only return HTTP 206 if less than the entire range has been + # requested. Not only is this semantically correct, but Chrome + # refuses to play audio if it gets an HTTP 206 in response to + # ``Range: bytes=0-``. if size != (end or size) - (start or 0): self.set_status(206) # Partial Content self.set_header("Content-Range",