mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-29 16:55:32 +00:00
Extract httputils.redirect
This commit is contained in:
parent
113eeec847
commit
9e9f2bb780
4 changed files with 10 additions and 12 deletions
|
@ -114,3 +114,9 @@ def read_request_body(configuration: "config.Configuration",
|
|||
read_raw_request_body(configuration, environ))
|
||||
logger.debug("Request content:\n%s", content)
|
||||
return content
|
||||
|
||||
|
||||
def redirect(location: str, status: int = client.FOUND) -> types.WSGIResponse:
|
||||
return (status,
|
||||
{"Location": location, "Content-Type": "text/plain"},
|
||||
"Redirected to %s" % location)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue