• Sina Siadat's avatar
    net/http: send Content-Range if no byte range overlaps · aa9b3d70
    Sina Siadat authored
    RFC 7233, section 4.4 says:
    >>>
    For byte ranges, failing to overlap the current extent means that the
    first-byte-pos of all of the byte-range-spec values were greater than the
    current length of the selected representation.  When this status code is
    generated in response to a byte-range request, the sender SHOULD generate a
    Content-Range header field specifying the current length of the selected
    representation
    <<<
    
    Thus, we should send the Content-Range only if none of the ranges
    overlap.
    
    Fixes #15798.
    
    Change-Id: Ic9a3e1b3a8730398b4bdff877a8f2fd2e30149e3
    Reviewed-on: https://go-review.googlesource.com/24212
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    aa9b3d70
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...