Skip to content

Commit c20a625

Browse files
committed
fix #132
1 parent 09a5861 commit c20a625

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

web-server-lib/web-server/http/response.rkt

+6-2
Original file line numberDiff line numberDiff line change
@@ -514,12 +514,16 @@
514514

515515
;; make-200-response : integer bytes integer (listof header) -> basic-response
516516
(define (make-200-response modified-seconds maybe-mime-type total-content-length headers)
517+
(define (ma h)
518+
(if (headers-assq* (header-field h) headers)
519+
null
520+
(list h)))
517521
(response
518522
200 #"OK"
519523
modified-seconds
520524
maybe-mime-type
521-
(append (list (make-header #"Accept-Ranges" #"bytes")
522-
(make-content-length-header total-content-length))
525+
(append (ma (make-header #"Accept-Ranges" #"bytes"))
526+
(ma (make-content-length-header total-content-length))
523527
headers)
524528
void))
525529

0 commit comments

Comments
 (0)