Remove legacy code and improve cookie support by iredmail · Pull Request #527 · webpy/webpy

@iredmail

@iredmail

@iredmail

@iredmail iredmail changed the title Remove py2.3 support. Remove legacy code

Sep 16, 2019

@iredmail

@iredmail

@iredmail iredmail changed the title Remove legacy code Remove legacy code and improve cookie support

Sep 16, 2019

cclauss

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))

cclauss

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.

cclauss

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iredmail

@iredmail

@codecov-io