@@ -392,6 +392,15 @@ spec = do
392392 it "streaming" $ withApp defaultSettings app $ \port -> do
393393 res <- sendHEAD $ concat ["http://127.0.0.1:", show port, "/streaming"]
394394 rspBody res `shouldBe` ""
395+ it "file, no range" $ withApp defaultSettings app $ \port -> do
396+ bs <- S.readFile fp
397+ res <- sendHEAD $ concat ["http://127.0.0.1:", show port, "/file"]
398+ getHeaderValue HdrContentLength res `shouldBe` Just (show $ S.length bs)
399+ it "file, with range" $ withApp defaultSettings app $ \port -> do
400+ res <- sendHEADwH
401+ (concat ["http://127.0.0.1:", show port, "/file"])
402+ [mkHeader HdrRange "bytes=0-1"]
403+ getHeaderValue HdrContentLength res `shouldBe` Just "2"
395404
396405consumeBody :: IO ByteString -> IO [ByteString]
397406consumeBody body =