mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-06-14 14:55:11 +02:00
Merge pull request #787 from arthurgleckler/master
Fix disconnects. Support more MIME types. Fix comment.
This commit is contained in:
commit
7a6aae39a0
2 changed files with 17 additions and 7 deletions
|
@ -24,15 +24,25 @@
|
||||||
;; most of these are plain text for easier viewing in the browser
|
;; most of these are plain text for easier viewing in the browser
|
||||||
(define (mime-type-from-extension ext)
|
(define (mime-type-from-extension ext)
|
||||||
(assq-ref
|
(assq-ref
|
||||||
'((htm . "text/html; charset=utf-8")
|
'((c . "text/plain; charset=utf-8")
|
||||||
|
(css . "text/css; charset=utf-8")
|
||||||
|
(gif . "image/gif")
|
||||||
|
(h . "text/plain; charset=utf-8")
|
||||||
|
(htm . "text/html; charset=utf-8")
|
||||||
(html . "text/html; charset=utf-8")
|
(html . "text/html; charset=utf-8")
|
||||||
|
(jpeg . "image/jpeg")
|
||||||
|
(jpg . "image/jpeg")
|
||||||
|
(js . "application/javascript; charset=utf-8")
|
||||||
|
(json . "application/json; charset=utf-8")
|
||||||
|
(md . "text/plain; charset=utf-8")
|
||||||
|
(mp3 . "audio/mpeg")
|
||||||
|
(org . "text/plain; charset=utf-8")
|
||||||
|
(pdf . "application/pdf")
|
||||||
|
(png . "image/png")
|
||||||
(scm . "text/plain; charset=utf-8")
|
(scm . "text/plain; charset=utf-8")
|
||||||
(sld . "text/plain; charset=utf-8")
|
(sld . "text/plain; charset=utf-8")
|
||||||
(c . "text/plain; charset=utf-8")
|
(svg . "image/svg+xml")
|
||||||
(h . "text/plain; charset=utf-8")
|
(txt . "text/plain; charset=utf-8"))
|
||||||
(txt . "text/plain; charset=utf-8")
|
|
||||||
(org . "text/plain; charset=utf-8")
|
|
||||||
(md . "text/plain; charset=utf-8"))
|
|
||||||
(and (string? ext) (string->symbol ext))))
|
(and (string? ext) (string->symbol ext))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
@ -524,7 +524,7 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Sample main. In chibi-scheme you can run:
|
;; Sample main. In chibi-scheme you can run:
|
||||||
;;
|
;;
|
||||||
;; chibi-scheme -Rchibi.net.http-config-server -- [<cfg-file-or-directory>]
|
;; chibi-scheme -Rchibi.net.http-server -- [<cfg-file-or-directory>]
|
||||||
;;
|
;;
|
||||||
;; which defaults to serving the current directory on port 8000.
|
;; which defaults to serving the current directory on port 8000.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue