From 4c324413206ee42f4611b50a86529d096d63dbaf Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Mon, 6 Sep 2021 07:56:05 +0200 Subject: Work around "fake" empty path by uri-common (#1448) When we check to see if the underlying path must be updated to be present, we should know that uri-common is faking a path of (/ "") when the path is empty. The path normalization in uri-common could use some work though, as it never really touches the underlying uri-generic object. On the other hand, this is sort of the promise that uri-common tries to make - it never mangles the uri object unless you explicitly update something yourself. --- http-client.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-client.scm b/http-client.scm index 79638c1..5d33835 100644 --- a/http-client.scm +++ b/http-client.scm @@ -591,7 +591,7 @@ host: #f port: #f scheme: #f))) ;; Update path only when it needs to be updated, to ;; avoid unnecessarily mangling it (see #1448) - (req-uri (if (not (memq (uri-path req-uri) '(() #f))) + (req-uri (if (not (member (uri-path req-uri) '(() #f (/ "") ("")))) req-uri (update-uri req-uri path: '(/ "")))) (request (write-request (update-request req uri: req-uri))) -- cgit v1.2.3