Remove legacy code and improve cookie support by iredmail · Pull Request #527 · webpy/webpy
iredmail
changed the title
Remove py2.3 support.
Remove legacy code
iredmail
changed the title
Remove legacy code
Remove legacy code and improve cookie support
| cookie_path = self._config.cookie_path | ||
| httponly = self._config.httponly | ||
| secure = self._config.secure | ||
| samesite = kw.get("samesite", None) or self._config.get("samesite", None) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
samesite = kw.get("samesite", self._config.get("samesite", None))
| value += "; httponly" | ||
| morsel["httponly"] = True | ||
| value = morsel.OutputString() | ||
| if samesite and samesite.lower() in ["strict", "lax"]: |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a tuple instead of a list because it is slightly more memory efficient and can not be modified at runtime.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters