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
bpo-34951 Updated regex in pattern for finding cookie (rfc2616) #19393
Conversation
… cookie if day of week is specified in deprecated format(rfc2616).
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
I've confirmed that without this PR, the existing regular expression |
Thanks for working on this!
This PR will need tests checking that this parsing works as expected on several examples of "expires" dates.
Also, this PR doesn't add support for the third date format described in RFC 2616 section 3.3.1, the "ANSI C's asctime() format", for example: Sun Nov 6 08:49:37 1994
. If we're going to fix this to properly support the spec, let's do it right!
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Changes were requested by a core dev around a year and half ago, but have not been made. I am therefore closing this PR. @lpopil, if you're still interested in working on this issue, feel free to open a new PR. Alternatively, ping me, and I'll happily reopen the PR. Thanks! |
Updated regex for special case for "expires" attr in pattern for finding cookie if day of week is specified in deprecated format (rfc2616).
According to https://tools.ietf.org/html/rfc2616#section-3.3.1, clients and servers that parse the date value MUST accept all three formats (for compatibility with HTTP/1.0).
But the current regular expression does not match dates in the following format:
https://bugs.python.org/issue34951