[issue41945] http.cookies.SimpleCookie.parse error after [keys] or some JSON data values

2022-01-04 Thread Jan Novak
Jan Novak added the comment: New examples with the structured data. Problems are with quotes and spaces inside { or [ cookie-script.com set those cookie data: CookieScriptConsent={"action":"accept","categories":"[\\"performance\\"]"} Python loads only cookies before that JSON structure >>>

[issue41945] http.cookies.SimpleCookie.parse error after [keys]

2020-11-05 Thread Jan Novak
Jan Novak added the comment: Possible patch, load parts one by one: http_cookie = 'id=12345; [object Object]=data; something=not_loaded' for cookie_key in http_cookie.split(';'): c.load(cookie_key) print c Set-Cookie: id=12345 Set-Cookie: something=not_loaded --

[issue41945] http.cookies.SimpleCookie.parse error after [keys]

2020-10-05 Thread Jan Novak
New submission from Jan Novak : If brackets [] are around cookie name, next cookie names are not loaded. try: import http.cookies as Cookie except ImportError: import Cookie c = Cookie.SimpleCookie() c.load('id=12345; [object Object]=data; something=not loaded') print(c) Note: It could