forked from cadence/breezewiki
shrug
This commit is contained in:
parent
f2de0cc11f
commit
fb21700517
1 changed files with 7 additions and 7 deletions
|
@ -31,17 +31,17 @@
|
||||||
(define (url-content-type url)
|
(define (url-content-type url)
|
||||||
(log-outgoing url)
|
(log-outgoing url)
|
||||||
(define dest-res (easy:head url #:timeouts timeouts))
|
(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)
|
(define (get-media-html url content-type)
|
||||||
(cond
|
(cond
|
||||||
[(eq? content-type #f) `""]
|
[(eq? content-type #f) `""]
|
||||||
[(regexp-match? #rx"^image/" content-type)
|
[(regexp-match? #rx"^(?i)image/" content-type)
|
||||||
`(img (@ (src ,(u-proxy-url url))))]
|
`(img (@ (src ,url)))]
|
||||||
[(regexp-match? #rx"^audio/|^application/ogg$" content-type)
|
[(regexp-match? #rx"^(?i)audio/|^(?i)application/ogg(;|$)" content-type)
|
||||||
`(audio (@ (src ,(u-proxy-url url)) (controls)))]
|
`(audio (@ (src ,url) (controls)))]
|
||||||
[(regexp-match? #rx"^video/" content-type)
|
[(regexp-match? #rx"^(?i)video/" content-type)
|
||||||
`(video (@ (src ,(u-proxy-url url)) (controls)))]
|
`(video (@ (src ,url) (controls)))]
|
||||||
[else `""]))
|
[else `""]))
|
||||||
|
|
||||||
(define (generate-results-page
|
(define (generate-results-page
|
||||||
|
|
Loading…
Reference in a new issue