fixed issue 188,trailing spaces not allowed in header (#194)

This commit is contained in:
Witekkq 2018-11-08 10:34:06 +01:00 committed by Tom Christie
parent 150c7092e5
commit 0c3453815c
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ class Response:
cookie[key]["secure"] = True # type: ignore
if httponly:
cookie[key]["httponly"] = True # type: ignore
cookie_val = cookie.output(header="")
cookie_val = cookie.output(header="").strip()
self.raw_headers.append((b"set-cookie", cookie_val.encode("latin-1")))
def delete_cookie(self, key: str, path: str = "/", domain: str = None) -> None: