mirror of https://github.com/encode/starlette.git
🐛 Adding a percent sign to redirect with quoted params (#449)
This commit is contained in:
parent
60a71ef1d8
commit
9ba2ba624b
|
@ -163,7 +163,7 @@ class RedirectResponse(Response):
|
||||||
self, url: typing.Union[str, URL], status_code: int = 302, headers: dict = None
|
self, url: typing.Union[str, URL], status_code: int = 302, headers: dict = None
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__(content=b"", status_code=status_code, headers=headers)
|
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):
|
class StreamingResponse(Response):
|
||||||
|
|
Loading…
Reference in New Issue