Skip to content

Allow whitespace in Range headers#125

Merged
etrepum merged 1 commit intomochi:masterfrom
nparry:whitespace_in_range_header
Feb 6, 2014
Merged

Allow whitespace in Range headers#125
etrepum merged 1 commit intomochi:masterfrom
nparry:whitespace_in_range_header

Conversation

@nparry
Copy link
Contributor

@nparry 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...

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...
etrepum added a commit that referenced this pull request Feb 6, 2014
@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants