🐛 Adding a percent sign to redirect with quoted params (#449)

This commit is contained in:
Konstantin Chernyshkov 2019-03-26 19:19:32 +05:00 committed by Tom Christie
parent 60a71ef1d8
commit 9ba2ba624b
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ class RedirectResponse(Response):
self, url: typing.Union[str, URL], status_code: int = 302, headers: dict = None
) -> None:
super().__init__(content=b"", status_code=status_code, headers=headers)
self.headers["location"] = quote_plus(str(url), safe=":/#?&=@[]!$&'()*+,;")
self.headers["location"] = quote_plus(str(url), safe=":/%#?&=@[]!$&'()*+,;")
class StreamingResponse(Response):