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
This commit is contained in:
Christopher Baines 2020-06-01 19:35:06 +01:00
parent f8de7cf42e
commit 1241726162

View file

@ -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