@@ -392,6 +392,15 @@ spec = do
392 it "streaming" $ withApp defaultSettings app $ \port -> do
392 it "streaming" $ withApp defaultSettings app $ \port -> do
393 res <- sendHEAD $ concat ["http://127.0.0.1:", show port, "/streaming"]
393 res <- sendHEAD $ concat ["http://127.0.0.1:", show port, "/streaming"]
394 rspBody res `shouldBe` ""
394 rspBody res `shouldBe` ""
395+ it "file, no range" $ withApp defaultSettings app $ \port -> do
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
401+ (concat ["http://127.0.0.1:", show port, "/file"])
402+ [mkHeader HdrRange "bytes=0-1"]
403+ getHeaderValue HdrContentLength res `shouldBe` Just "2"
396consumeBody :: IO ByteString -> IO [ByteString]
405consumeBody :: IO ByteString -> IO [ByteString]
397consumeBody body =
406consumeBody body =