Change by MeiK :
--
keywords: +patch
pull_requests: +14577
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14781
___
Python tracker
<https://bugs.python.org/issu
New submission from MeiK :
In Python's built-in SimpleCookie[1], regular expressions are used to parse
cookies, which seems to be a non-standard way.
I looked at the RFC documentation related to cookie resolution: rfc2109[2] and
rfc6265[3], the former has been replaced by the latter.
MeiK added the comment:
I found that using http.cookiejar.parse_ns_headers would cause some of the
previous tests to fail, and if you think this method is workable, I can follow
it to write a new one and pass all the tests.
--
nosy: -martin.panter, xtreak
MeiK added the comment:
You are right, I saw the agreed way of parsing in RFC6265[1], it seems that you
should not use regular expressions.
I used http.cookiejar to update the code, but it failed to pass the test:
https://github.com/python/cpython/blob/master/Lib/test/test_http_cookies.py
New submission from MeiK :
http.cookies.BaseCookie[1] can't parse Expires in this format like
Expires=Thu,31 Jan 2019 05:56:00 GMT;(Less space after Thu,).
I encountered this problem in actual use, Chrome, IE and Firefox can parse this
string normally. Many languages, such as JavaScript
Change by MeiK :
--
components: Extension Modules
nosy: MeiK
priority: normal
severity: normal
status: open
title: http.cookies._CookiePattern modifying regular expressions
type: enhancement
___
Python tracker
<https://bugs.python.org/issue35