Changes between Initial Version and Version 3 of Ticket #2459


Ignore:
Timestamp:
2015-07-07T20:39:04Z (9 years ago)
Author:
daira
Comment:

See https://tools.ietf.org/html/rfc2616#section-14.16 for the HTTP/1.1 spec. The correct response for the Range: bytes=0-2 case is the whole file. (A '416 Requested Range not satisfiable' error should not be returned in that case, because the requested range does have an overlap with the file contents. The web-API seems to correctly return a 416 error if the starting byte offset is past the end of the file.)

There is currently no test for Range requests for SDMF in test_mutable.py; only for MDMF. I have added one for SDMF on the https://github.com/tahoe-lafs/tahoe-lafs/commits/2659.test-sdmf-version-partial-read.0 branch.

The behaviour of this test (Version.test_partial_read_sdmf_*) is confusing; it works when the data is 100 bytes or 2 bytes, but not if it is 90 bytes. Perhaps there is an off-by-one error that only triggers when the size of the data is a multiple of k bytes? (See 2462#comment:3 for why that might happen.) But the case that hangs in this ticket is 2 bytes, which suggests that the test is not finding the same bug.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2459 – Description

    initial v3  
    1 The webapi hangs if a GET request with Range header is sent and the Range is equal the size or size-1 if cap is a unterminated string.
     1The web-API hangs if a `GET` request with `Range` header is sent and the end byteRange is equal the size or size-1 if cap is a unterminated string.
    22
    33given that filecap contains 'hi':