# HG changeset patch # User Arne Babenhauserheide # Date 1617534108 -7200 # Sun Apr 04 13:01:48 2021 +0200 # Node ID 9a0ac1b02b67a004da899630a292dc728b4a4da1 # Parent 4541f36df0b046be6d196f7222c4caf43e7d6f3d support m3u playlists diff --git a/wispserve/serve.w b/wispserve/serve.w --- a/wispserve/serve.w +++ b/wispserve/serve.w @@ -457,6 +457,8 @@ cond : not mime-type . 'application/octet-stream + : string-suffix? ".m3u" path + . 'application/x-mpegurl : equal? mime-type 'video/x-matroska . 'video/webm else mime-type @@ -718,6 +720,7 @@ define : server-file-download-handler folder-path request body define headers : request-headers request + 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".