Range: BYTES=0-999 uppercase

39 views
Skip to first unread message

Pete Zaitcev

unread,
Jun 19, 2012, 6:49:59 PM6/19/12
to paste...@googlegroups.com, Pete Zaitcev
Hello:

The webob-1.2 includes the following in byterange.py:

_rx_range = re.compile('bytes *= *(\d*) *- *(\d*)')

It causes Openstack Swift functional tests fail after an upgrade from
webob-1.1 to webob-1.2. The test looks like this:

for r in ('BYTES=0-999', 'bytes = 0-999', 'BYTES = 0 - 999',
'bytes = 0 - 999', 'bytes=0 - 999', 'bytes=0-999 '):

self.assert_(file.read(hdrs={'Range': r}) == data[0:1000])

I think that the regex needs flags=re.I. The pre-1.2 code had
a parser that used .lower() to accomplish the necessary action.

-- Pete

Sergey Schetinin

unread,
Jun 20, 2012, 5:12:41 AM6/20/12
to Pete Zaitcev, paste...@googlegroups.com
Sure. 

Please submit a pull request w/ a test included.


-- Pete

--
You received this message because you are subscribed to the Google Groups "Paste Users" group.
To post to this group, send email to paste...@googlegroups.com.
To unsubscribe from this group, send email to paste-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/paste-users?hl=en.


Pete Zaitcev

unread,
Jul 11, 2012, 8:55:40 PM7/11/12
to paste...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages