-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Lines 262 to 285 in 37c6db6
| # RFC 2109 lists these attributes as reserved: | |
| # path comment domain | |
| # max-age secure version | |
| # | |
| # For historical reasons, these attributes are also reserved: | |
| # expires | |
| # | |
| # This is an extension from Microsoft: | |
| # httponly | |
| # | |
| # This dictionary provides a mapping from the lowercase | |
| # variant on the left to the appropriate traditional | |
| # formatting on the right. | |
| _reserved = { | |
| "expires" : "expires", | |
| "path" : "Path", | |
| "comment" : "Comment", | |
| "domain" : "Domain", | |
| "max-age" : "Max-Age", | |
| "secure" : "Secure", | |
| "httponly" : "HttpOnly", | |
| "version" : "Version", | |
| "samesite" : "SameSite", | |
| } |
RFC2109 is obsolete.
RFC6265 has only the following headers
Expires
Max-Age
Domain
Path
Secure
HttpOnly
from http.cookies import SimpleCookie
rawdata = 'version=4'
cookie = SimpleCookie()
import http.cookies
cookie.load(rawdata)
print(cookie) # empty ; expected {'version': '4'}
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status