]> birchwood-abbey.net Git - mit-scheme.git/commitdiff
Fix bug #63166.
authorChris Hanson <org/chris-hanson/cph>
Thu, 13 Oct 2022 09:25:06 +0000 (02:25 -0700)
committerChris Hanson <org/chris-hanson/cph>
Thu, 13 Oct 2022 09:25:06 +0000 (02:25 -0700)
HTTP client now only accepts the "http" scheme and rejects others.

src/runtime/http-client.scm

index 00e2b81b32ef2b8bfe45bfb02c3074829abdb894..691c40fb6ddb5acdc393774027522c8ce71a7246 100644 (file)
@@ -47,6 +47,9 @@ USA.
        (read-http-response request port)))))
 
 (define (call-with-http-client-socket uri callee)
+  (let ((scheme (uri-scheme uri)))
+    (if (not (or (not scheme) (eq? 'http scheme)))
+       (error "Unsupported HTTP scheme:" scheme)))
   (let ((port
         (let ((auth (uri-authority uri)))
           (open-binary-tcp-stream-socket (uri-authority-host auth)