summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-10-13 17:56:04 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-10-13 17:56:04 -0400
commitc089745776220fa42a43181ecd9c25abc1400c88 (patch)
tree1ff34b430c680052a5e527bd0ce2c3c7107516a5
parentcb21f2aa5fb43e8fdd44ff91ecc5f5782e44c038 (diff)
Fix 404 rendering for static assets.
* guix-web/render.scm (render-static-asset): Build proper URI.
-rw-r--r--guix-web/render.scm5
1 files changed, 4 insertions, 1 deletions
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)))