projects
/
mudsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More progress towards working websockets stuff. Add mime-types.scm to contrib.
[mudsync.git]
/
mudsync
/
networking.scm
diff --git
a/mudsync/networking.scm
b/mudsync/networking.scm
index b938c8a9427bdf53936c44c1e9b7a045abdd4048..1c28b38dcbb4ef872c8e1663e5fa12dac2eb6329 100644
(file)
--- a/
mudsync/networking.scm
+++ b/
mudsync/networking.scm
@@
-32,6
+32,7
@@
#:use-module (web response)
#:use-module (web uri)
#:use-module (mudsync package-config)
#:use-module (web response)
#:use-module (web uri)
#:use-module (mudsync package-config)
+ #:use-module (mudsync contrib mime-types)
#:use-module (rnrs io ports)
#:export (;; Should we be exporting these?
#:use-module (rnrs io ports)
#:export (;; Should we be exporting these?
@@
-227,7
+228,9
@@
(head (title "Mudsync!")
(meta (@ (charset "UTF-8")))
(link (@ (rel "stylesheet")
(head (title "Mudsync!")
(meta (@ (charset "UTF-8")))
(link (@ (rel "stylesheet")
- (href "/static/css/main.css"))))
+ (href "/static/css/main.css")))
+ (script (@ (type "text/javascript")
+ (src "/static/js/mudsync.js"))))
(body ,@body-tmpl)))
(define (write-template-to-string)
(with-fluids ((%default-port-encoding "UTF-8"))
(body ,@body-tmpl)))
(define (write-template-to-string)
(with-fluids ((%default-port-encoding "UTF-8"))
@@
-240,8
+243,7
@@
(define (view:render-static request body static-path)
(values (build-response #:code 200
(define (view:render-static request body static-path)
(values (build-response #:code 200
- ;; #:content-type (mime-type static-path)
- )
+ #:headers `((content-type . (,(mime-type static-path)))))
(call-with-input-file (web-static-filepath static-path) get-bytevector-all)))
(define (view:standard-four-oh-four . args)
(call-with-input-file (web-static-filepath static-path) get-bytevector-all)))
(define (view:standard-four-oh-four . args)