From fb217005172ac4efe3cffe7f12d583cd74cc2c37 Mon Sep 17 00:00:00 2001 From: blankie Date: Sun, 9 Oct 2022 10:43:29 +0700 Subject: [PATCH] shrug --- src/page-file.rkt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/page-file.rkt b/src/page-file.rkt index 472652e..7fc9bd1 100644 --- a/src/page-file.rkt +++ b/src/page-file.rkt @@ -31,17 +31,17 @@ (define (url-content-type url) (log-outgoing url) (define dest-res (easy:head url #:timeouts timeouts)) - (easy:response-headers-ref dest-res 'Content-Type)) + (easy:response-headers-ref dest-res 'content-type)) (define (get-media-html url content-type) (cond [(eq? content-type #f) `""] - [(regexp-match? #rx"^image/" content-type) - `(img (@ (src ,(u-proxy-url url))))] - [(regexp-match? #rx"^audio/|^application/ogg$" content-type) - `(audio (@ (src ,(u-proxy-url url)) (controls)))] - [(regexp-match? #rx"^video/" content-type) - `(video (@ (src ,(u-proxy-url url)) (controls)))] + [(regexp-match? #rx"^(?i)image/" content-type) + `(img (@ (src ,url)))] + [(regexp-match? #rx"^(?i)audio/|^(?i)application/ogg(;|$)" content-type) + `(audio (@ (src ,url) (controls)))] + [(regexp-match? #rx"^(?i)video/" content-type) + `(video (@ (src ,url) (controls)))] [else `""])) (define (generate-results-page