Bug #1449

"Accept-Ranges: bytes" when range-request is disabled

Added by Anonymous over 6 years ago. Updated over 5 years ago.

Status:FixedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:core
Target version:1.5.0
Missing in 1.5.x:

Description

When the server is configured to deny range requests, e.g. by putting the following statement in the configuration file:


$HTTP["url"] =~ "\.flv$" {
  server.range-requests = "disable" 
}

When accessing a file that matches the disabled pattern, using either the HEAD or GET methods, the server replies


HTTP/1.1 200 OK
Content-Type: application/octet-stream
Accept-Ranges: bytes
ETag: "2038925148" 
Last-Modified: Mon, 12 Nov 2007 12:22:07 GMT
Content-Length: 9286325
Date: Tue, 13 Nov 2007 17:56:27 GMT
Server: lighttpd/1.4.18

Note the '''Accept-Ranges: bytes''' header: delivery of the range is indeed disabled, but the server stated that range is supported (in contradiction to section 14.5 of RFC 2068). This confuses clients that try to handle ranges.

-- oded.noam

lighttpd_bug.pcap - partial capture of a session in which "Range" support is indicated but disabled -- oded.noam (36.1 KB) Anonymous, 2007-11-13 15:16

0013-Do-not-add-Accept-Ranges-header-if-range-request-is.patch Magnifier (903 Bytes) stbuehler, 2008-02-18 00:15

History

#1 Updated by Anonymous over 6 years ago

I'm writing one such client that is attempting to handle range requests correctly and just now came across this independently.

-- Rusty C. Shackleford

#2 Updated by stbuehler about 6 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r2090

Also available in: Atom