Allow whitespace in Range headers #125

Merged
merged 1 commit into from Feb 6, 2014

Projects

None yet

2 participants

@nparry
Contributor
nparry commented Feb 6, 2014

While investigating basho/webmachine#186 it was noted that a small but
non-zero percentage of clients embed whitespace in Range headers. It
appears this is valid:

From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

byte-range-set  = 1#( byte-range-spec | suffix-byte-range-spec )

From http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2

#rule
...separated by one or more commas (",") and OPTIONAL linear
white space (LWS)...
...null elements are allowed, but do not contribute to the count
of elements present. That is, "(element), , (element) " is permitted,
but counts as only two elements...
@nparry nparry Allow whitespace in Range headers
While investigating basho/webmachine#186 it was noted that a small but
non-zero percentage of clients embed whitespace in Range headers. It
appears this is valid:

From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

    byte-range-set  = 1#( byte-range-spec | suffix-byte-range-spec )

From http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2

    #rule
    ...separated by one or more commas (",") and OPTIONAL linear
    white space (LWS)...
    ...null elements are allowed, but do not contribute to the count
    of elements present. That is, "(element), , (element) " is permitted,
    but counts as only two elements...
176ddce
@etrepum etrepum merged commit 8eb1f22 into mochi:master Feb 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment