@@ 400,7 400,7 @@ define : list-files
sort files string<?
string-join
append
- list "<!DOCTYPE html><html><head><title>wispserve Files</title></head><body><h2>Upload</h2><form action='/upload' method='POST' enctype='multipart/form-data'>
+ list "<!DOCTYPE html><html><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>wispserve Files</title></head><body><h2>Upload</h2><form action='/upload' method='POST' enctype='multipart/form-data'>
<input type='file' name='img' multiple />
<input type='submit' value='Upload' />
</form><h2>Files</h2><ul>"
@@ 515,7 515,7 @@ define : server-serve-file range-request
. #f
or
cdr begin-end
- ;; if no size is requested, optimize for streaming video, since that’s tho only thing that really needs optimizing
+ ;; if no size is requested, optimize for streaming video, since that’s the only thing that really needs optimizing
min : - filesize 1
+ range-begin
cond
@@ 779,7 779,7 @@ define : server-serve-favicon
define : server-file-download-handler folder-path request body
define headers : request-headers request
- pretty-print : and body (utf8->string body)
+ ;; pretty-print : and body (utf8->string body)
let*
: range-requested : assoc-item headers 'range
disallow-range : not : or range-requested : assoc-item headers 'accept-language ;; accept-language is typically interactive, so if it is not present, we fall back to providing the whole file in one go. This is just a heuristic, though. There is no good way to detect "will accept Range response, even though it did not request it".