We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a5d7f7 commit 2fb3a42Copy full SHA for 2fb3a42
wsgidav/request_server.py
@@ -941,7 +941,10 @@ def _debug_exception(e):
941
if src_res.is_collection:
942
dest_path = dest_path.rstrip("/") + "/"
943
944
- if dest_scheme and dest_scheme.lower() != environ["wsgi.url_scheme"].lower():
+ dest_scheme = dest_scheme.lower() if dest_scheme else ""
945
+ url_scheme = environ["wsgi.url_scheme"].lower()
946
+ fwd_scheme = environ.get("HTTP_X_FORWARDED_PROTO", "").lower()
947
+ if dest_scheme and dest_scheme not in (url_scheme, fwd_scheme):
948
self._fail(
949
HTTP_BAD_GATEWAY,
950
"Source and destination must have the same scheme.\n"
0 commit comments