Skip to content

Commit

Permalink
fix #132
Browse files Browse the repository at this point in the history
  • Loading branch information
jeapostrophe committed Feb 20, 2024
1 parent 09a5861 commit c20a625
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web-server-lib/web-server/http/response.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,16 @@

;; make-200-response : integer bytes integer (listof header) -> basic-response
(define (make-200-response modified-seconds maybe-mime-type total-content-length headers)
(define (ma h)
(if (headers-assq* (header-field h) headers)
null
(list h)))
(response
200 #"OK"
modified-seconds
maybe-mime-type
(append (list (make-header #"Accept-Ranges" #"bytes")
(make-content-length-header total-content-length))
(append (ma (make-header #"Accept-Ranges" #"bytes"))
(ma (make-content-length-header total-content-length))
headers)
void))

Expand Down

0 comments on commit c20a625

Please sign in to comment.