mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-25 19:30:54 +00:00
Extract httputils.redirect
This commit is contained in:
parent
113eeec847
commit
9e9f2bb780
4 changed files with 10 additions and 12 deletions
|
@ -197,10 +197,8 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
|
|||
location = base_prefix + path
|
||||
logger.info("Redirecting to sanitized path: %r ==> %r",
|
||||
base_prefix + unsafe_path, location)
|
||||
return response(
|
||||
client.MOVED_PERMANENTLY,
|
||||
{"Location": location, "Content-Type": "text/plain"},
|
||||
"Redirected to %s" % location)
|
||||
return response(*httputils.redirect(
|
||||
location, client.MOVED_PERMANENTLY))
|
||||
logger.debug("Sanitized path: %r", path)
|
||||
|
||||
# Get function corresponding to method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue