mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-04 18:22:26 +00:00
Extract httputils.redirect
This commit is contained in:
parent
113eeec847
commit
9e9f2bb780
4 changed files with 10 additions and 12 deletions
|
@ -62,10 +62,7 @@ class ApplicationPartGet(ApplicationBase):
|
|||
"""Manage GET request."""
|
||||
# Redirect to .web if the root URL is requested
|
||||
if not pathutils.strip_path(path):
|
||||
location = ".web"
|
||||
return (client.FOUND,
|
||||
{"Location": location, "Content-Type": "text/plain"},
|
||||
"Redirected to %s" % location)
|
||||
return httputils.redirect(".web")
|
||||
# Dispatch .web URL to web module
|
||||
if path == "/.web" or path.startswith("/.web/"):
|
||||
return self._web.get(environ, base_prefix, path, user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue