Conversation
Fixed -2250
requests/utils.py
Outdated
There was a problem hiding this comment.
Regex is more capable than string utils
There was a problem hiding this comment.
Also, please put a after the comma, e.g.,split(",\ *<", value).
There was a problem hiding this comment.
Done
On Thu, Oct 9, 2014 at 8:07 AM, Ian Cordasco notifications@github.com
wrote:
In requests/utils.py:
@@ -567,7 +567,7 @@ def parse_header_links(value):
replace_chars = " '\""
- for val in value.split(","):
- for val in re.split(",\ *<",value):
Also, please put a after the comma, e.g., split(",\ *<", value).
—
Reply to this email directly or view it on GitHub
https://github.com/kennethreitz/requests/pull/2271/files#r18650977.
requests/utils.py
Outdated
There was a problem hiding this comment.
Why do you have a \ in the expression? I'm very certain that's unnecessary if you're trying to say "zero or more s".
There was a problem hiding this comment.
You're completely right, sorry I do most of my regex in js, where it would be necessary sometimes
There was a problem hiding this comment.
No worries. I should have caught that earlier.
Fixed #2250 with #2271