We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09a5861 commit c20a625Copy full SHA for c20a625
web-server-lib/web-server/http/response.rkt
@@ -514,12 +514,16 @@
514
515
;; make-200-response : integer bytes integer (listof header) -> basic-response
516
(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)))
521
(response
522
200 #"OK"
523
modified-seconds
524
maybe-mime-type
- (append (list (make-header #"Accept-Ranges" #"bytes")
- (make-content-length-header total-content-length))
525
+ (append (ma (make-header #"Accept-Ranges" #"bytes"))
526
+ (ma (make-content-length-header total-content-length))
527
headers)
528
void))
529
0 commit comments