This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new 1241726  Decode the names of requested nar files
1241726 is described below

commit 124172616296fd608a8335dc6b3933fdd30c7b9e
Author: Christopher Baines <m...@cbaines.net>
AuthorDate: Mon Jun 1 19:35:06 2020 +0100

    Decode the names of requested nar files
    
    It seems that when requesting substitutes, the filename is percent encoded,
    for example:
    
      /nar/zyw0clrhh1smfxvkb6lih77fss85m75w-w3m-0.5.3%2Bgit20190105-checkout.drv
---
 guix-data-service/web/nar/controller.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix-data-service/web/nar/controller.scm 
b/guix-data-service/web/nar/controller.scm
index 606040e..2bf61be 100644
--- a/guix-data-service/web/nar/controller.scm
+++ b/guix-data-service/web/nar/controller.scm
@@ -75,7 +75,7 @@
      ;; content negotiation, so just use the path from the request
      (let* ((path (uri-path (request-uri request)))
             (file-name
-             (last (string-split path #\/))))
+             (uri-decode (last (string-split path #\/)))))
        (render-nar request
                    mime-types
                    conn
@@ -85,7 +85,7 @@
      ;; content negotiation, so just use the path from the request
      (let* ((path (uri-path (request-uri request)))
             (file-name
-             (last (string-split path #\/))))
+             (uri-decode (last (string-split path #\/)))))
        (render-lzip-nar request
                         mime-types
                         conn

Reply via email to