log on_notice_condition: implementation
This commit is contained in:
@@ -49,7 +49,7 @@ class BaseWeb:
|
||||
self.configuration = configuration
|
||||
|
||||
def get(self, environ: types.WSGIEnviron, base_prefix: str, path: str,
|
||||
user: str) -> types.WSGIResponse:
|
||||
user: str, request_info: dict) -> types.WSGIResponse:
|
||||
"""GET request.
|
||||
|
||||
``base_prefix`` is sanitized and never ends with "/".
|
||||
@@ -58,11 +58,13 @@ class BaseWeb:
|
||||
|
||||
``user`` is empty for anonymous users.
|
||||
|
||||
``request_info`` dict of additional information
|
||||
|
||||
"""
|
||||
return httputils.METHOD_NOT_ALLOWED
|
||||
|
||||
def post(self, environ: types.WSGIEnviron, base_prefix: str, path: str,
|
||||
user: str) -> types.WSGIResponse:
|
||||
user: str, request_info: dict) -> types.WSGIResponse:
|
||||
"""POST request.
|
||||
|
||||
``base_prefix`` is sanitized and never ends with "/".
|
||||
@@ -71,6 +73,8 @@ class BaseWeb:
|
||||
|
||||
``user`` is empty for anonymous users.
|
||||
|
||||
``request_info`` dict of additional information
|
||||
|
||||
Use ``httputils.read*_request_body(self.configuration, environ)`` to
|
||||
read the body.
|
||||
|
||||
|
||||
@@ -34,6 +34,6 @@ FALLBACK_MIMETYPE = httputils.FALLBACK_MIMETYPE # deprecated
|
||||
class Web(web.BaseWeb):
|
||||
|
||||
def get(self, environ: types.WSGIEnviron, base_prefix: str, path: str,
|
||||
user: str) -> types.WSGIResponse:
|
||||
user: str, request_info: dict) -> types.WSGIResponse:
|
||||
return httputils.serve_resource("radicale.web", "internal_data",
|
||||
base_prefix, path)
|
||||
|
||||
@@ -28,7 +28,7 @@ from radicale import httputils, pathutils, types, web
|
||||
class Web(web.BaseWeb):
|
||||
|
||||
def get(self, environ: types.WSGIEnviron, base_prefix: str, path: str,
|
||||
user: str) -> types.WSGIResponse:
|
||||
user: str, request_info: dict) -> types.WSGIResponse:
|
||||
assert path == "/.web" or path.startswith("/.web/")
|
||||
assert pathutils.sanitize_path(path) == path
|
||||
if path != "/.web":
|
||||
|
||||
Reference in New Issue
Block a user