]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commit - src/allmydata/test/test_web.py
Improve HTTP/1.1 byterange handling
authorJeremy Fitzhardinge <jeremy@goop.org>
Wed, 10 Mar 2010 03:59:13 +0000 (20:59 -0700)
committerJeremy Fitzhardinge <jeremy@goop.org>
Wed, 10 Mar 2010 03:59:13 +0000 (20:59 -0700)
commit63b28d707b12202f029e36f88aba131c40cfa580
tree49c6bed8c557dac036b418b78a258fa1ac57205e
parentd13784b649ccf5e05879743017a479d179b89e56
Improve HTTP/1.1 byterange handling

Fix parsing of a Range: header to support:
 - multiple ranges (parsed, but not returned)
 - suffix byte ranges ("-2139")
 - correct handling of incorrectly formatted range headers
   (correct behaviour is to ignore the header and return the full
    file)
 - return appropriate error for ranges outside the file

Multiple ranges are parsed, but only the first range is returned.
Returning multiple ranges requires using the multipart/byterange
content type.
src/allmydata/test/test_web.py
src/allmydata/web/filenode.py