Skip to content

Commit a41831e

Browse files
stanislavlevinfrozencemetery
authored andcommitted
Fix invalid escape sequence "\s"
To prevent interference of escaping in strings with escaping in regex strings regex one should be marked as raw. Resolves: #9
1 parent 4bb65c8 commit a41831e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

requests_gssapi/gssapi_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _negotiate_value(response):
6767
else:
6868
# There's no need to re-compile this EVERY time it is called. Compile
6969
# it once and you won't have the performance hit of the compilation.
70-
regex = re.compile('(?:.*,)*\s*Negotiate\s*([^,]*),?', re.I)
70+
regex = re.compile(r'(?:.*,)*\s*Negotiate\s*([^,]*),?', re.I)
7171
_negotiate_value.regex = regex
7272

7373
authreq = response.headers.get('www-authenticate', None)

0 commit comments

Comments
 (0)