MeiK <meik2...@gmail.com> 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#L19.
 However, other languages and libraries (JavaScript, Requests, http.cookiejar, 
etc.) cannot parse it. It seems that the contents of the brackets should be 
escaped. Is this a wrong test case?

I updated the code[2] using http.cookiejar. Is this a good idea?

English is not my native language; please excuse typing errors.

[1] https://tools.ietf.org/html/rfc6265
[2] 
https://github.com/python/cpython/pull/11665/commits/a03bc75348a4041c7411da3175689c087a98789f

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35824>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to