From c089745776220fa42a43181ecd9c25abc1400c88 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 13 Oct 2014 17:56:04 -0400 Subject: Fix 404 rendering for static assets. * guix-web/render.scm (render-static-asset): Build proper URI. --- guix-web/render.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix-web/render.scm b/guix-web/render.scm index ef0d93f..1d88831 100644 --- a/guix-web/render.scm +++ b/guix-web/render.scm @@ -43,7 +43,10 @@ (list `((content-type . ,(assoc-ref file-mime-types (file-extension file-name)))) (call-with-input-file file-name get-bytevector-all)) - (not-found (string->uri file-name))))) + (not-found (build-uri 'http + #:host "localhost" + #:port guix-web-port + #:path (string-join path "/" 'prefix)))))) (define (render-html sxml) (list '((content-type . (text/html))) -- cgit v1.2.3