Make the "bytes=" unit case-insensitive in Range header #62

Merged
merged 1 commit into from Jul 12, 2012

Projects

None yet

2 participants

@zaitcev
zaitcev commented Jul 12, 2012

I was unable to find any clear guidance in RFC-2616 or elsewhere.
It looks like they simply forgot to mention if token called
"bytes-unit" is case-sensitive or not. Generally fields are
not sensitive, but there are exceptions. Certainly, it is valid
to accept extra units, if we deem "bytes=" and "BYTES=" different.

This patch came about because OpenStack Swift throws an exception
on WebOb 1.2. It worked in WebOb 1.0.8, where we had a code that
invoked .lower() before matching.

@zaitcev zaitcev Make the "bytes=" unit case-insensitive in Range header
I was unable to find any clear guidance in RFC-2616 or elsewhere.
It looks like they simply forgot to mention if token called
"bytes-unit" is case-sensitive or not. Generally fields are
not sensitive, but there are exceptions. Certainly, it is valid
to accept extra units, if we deem "bytes=" and "BYTES=" different.

This patch came about because OpenStack Swift throws an exception
on WebOb 1.2. It worked in WebOb 1.0.8, where we had a code that
invoked .lower() before matching.
6f1ff37
@maluke maluke merged commit 4bb9375 into Pylons:master Jul 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment