-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.7] bpo-31677: Backport regex used to match encoded-word strings #7856
Changes from 3 commits
5db4a1e
383ec0b
9610a99
8f38b36
0be6210
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,12 +35,11 @@ | |
=\? # literal =? | ||
(?P<charset>[^?]*?) # non-greedy up to the next ? is the charset | ||
\? # literal ? | ||
(?P<encoding>[qb]) # either a "q" or a "b", case insensitive | ||
(?P<encoding>[qQbB]) # either a "q" or a "b", case insensitive | ||
\? # literal ? | ||
(?P<encoded>.*?) # non-greedy up to the next ?= is the encoded string | ||
\?= # literal ?= | ||
(?=[ \t]|$) # whitespace or the end of the string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know this part and changes for tests are OK. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah sorry, this PR was a while back. This is really the issue here but was hidden when I copied the regex used in Python 3.x. Instead, I've reverted the noise so it's clear that it is this. |
||
''', re.VERBOSE | re.IGNORECASE | re.MULTILINE) | ||
''', re.VERBOSE | re.MULTILINE) | ||
|
||
# Field name regexp, including trailing colon, but not separating whitespace, | ||
# according to RFC 2822. Character range is from tilde to exclamation mark. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK for this part, but...