]> andersk Git - scripts-static-cat.git/commitdiff
Ignore unparsable byte ranges.
authorAnders Kaseorg <andersk@mit.edu>
Sat, 14 Aug 2010 04:19:47 +0000 (00:19 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Sat, 14 Aug 2010 04:19:47 +0000 (00:19 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
StaticCat.hs

index df4a6e271395f695629ad515dcfcdb0290413334..ba9e0b76137e3db0c1da5d6560e89a842ce13b0d 100644 (file)
@@ -140,7 +140,8 @@ checkRange mTime size = do
   (checkIfRange mTime >>=) $ maybe (return Nothing) $ \() -> do
     case parseRange range size of
       Just (a, b) | a <= b -> return $ Just (a, b)
-      _ -> throw BadRange
+      Just _ -> throw BadRange
+      Nothing -> return Nothing
 
 outputAll :: Handle -> FileOffset -> CGI CGIResult
 outputAll h size = do
This page took 0.492196 seconds and 5 git commands to generate.