on master help sign in
Don't send content-length from wai-app-static snoyberg/keter#52
commit7f38ba1bf61b85e3844c59132533c6692b2610ef authorMichael Snoyman <michael@snoyman.com> dateSun 19 Oct 2014, 23:58 (12 years ago) parent76d4748
1 file changed+3−1
wai-app-static/Network/Wai/Application/Static.hs+3−1
wai-app-static/Network/Wai/Application/Static.hs+3−1
@@ -212,7 +212,9 @@ staticAppPieces ss rawPieces req sendResponse = liftIO $ do
212212 mimetype <- ssGetMimeType ss file
213213 let filesize = fileGetSize file
214214 let headers = ("Content-Type", mimetype)
215− : ("Content-Length", S8.pack $ show filesize)
215+ -- Let Warp provide the content-length, since it takes
216+ -- range requests into account
217+ -- : ("Content-Length", S8.pack $ show filesize)
216218 : ch
217219 sendResponse $ fileToResponse file H.status200 headers
218220