aws/request: make-operation->request: Send request to full URI.
authorRicardo Wurmus <rekado@elephly.net>
Tue, 2 Mar 2021 21:55:54 +0000 (22:55 +0100)
committerRicardo Wurmus <rekado@elephly.net>
Tue, 2 Mar 2021 21:56:37 +0000 (22:56 +0100)
* aws/request.scm (make-operation->request): Send HTTP request to full
URI, not just the endpoint domain.

aws/request.scm

index 95dcfd1e2a8b031ea5bac947fde713083ecc4860..8ecb543f4f1b4afe65496f60e71b056c090b7dcb 100644 (file)
@@ -213,7 +213,7 @@ corresponding value in INPUT."
                    "."))
     (define endpoint
       (or (getenv "GUILE_AWS_DEBUG_ENDPOINT")
-          (string-append "https://" host "/")))
+          (string-append "https://" host)))
     (define json?
       (match (assoc-ref api-metadata 'protocol)
         ("json" #true)
@@ -327,7 +327,7 @@ corresponding value in INPUT."
 
     (call-with-values
         (lambda ()
-          (http-request endpoint
+          (http-request (string-append endpoint canonical-uri)
                         #:method (string->symbol method)
                         #:body
                         (match method