(define file-types
'(("gmi" "text/gemini" "charset=utf-8")
- ("txt" "text/plain" "charset=utf-8")))
+ ("txt" "text/plain" "charset=utf-8")
+ ("xml" "text/xml" "charset=utf-8")))
(define (process-request config request-line)
(let ((uri (uri-normalize-path-segments (absolute-uri request-line))))
(mime-type (cadr mime)))
(print "20 " (string-intersperse (cdr mime) ";") "\r")
(cond
- ((and (equal? mime-type "text/gemini")
- (file-executable? path))
- (serve-text-dynamic path))
+ ((file-executable? path)
+ (serve-text-dynamic path)) ; Binary-files can also be generated here, but the source is dynamic text
((string-prefix? "text/" mime-type)
(serve-text-plain path))
(else (serve-binary path)))))