HAppS-Server 0.9.2 → 0.9.2.1
raw patch · 3 files changed
+5/−5 lines, 3 files
Files
- HAppS-Server.cabal +1/−1
- src/HAppS/Server/HTTP/FileServe.hs +3/−3
- src/HAppS/Server/HTTP/Handler.hs +1/−1
HAppS-Server.cabal view
@@ -1,5 +1,5 @@ Name: HAppS-Server-Version: 0.9.2+Version: 0.9.2.1 Synopsis: Web related tools and services. Description: Web framework License: BSD3
src/HAppS/Server/HTTP/FileServe.hs view
@@ -81,8 +81,8 @@ returnFile mime rq fp = getFile mime fp >>= either fileNotFound (renderResponse mime rq) ---- #if fp has , separated then return concatenation with content-type of last--- #and last modified of latest+-- if fp has , separated then return concatenation with content-type of last+-- and last modified of latest tr a b list = map (\x->if x==a then b else x) list ltrim = dropWhile (flip elem " \t\r") @@ -98,7 +98,7 @@ if not $ null notFounds then fileNotFound $ drop (length localPath) $ head notFounds else do let totSize = sum $ map (snd . fst) files- maxTime::ClockTime = maximum $ map (fst . fst) files+ maxTime = maximum $ map (fst . fst) files :: ClockTime renderResponse mime rq ((maxTime,totSize),(fst $ snd $ head files, L.concat $ map (snd . snd) files))
src/HAppS/Server/HTTP/Handler.hs view
@@ -128,7 +128,7 @@ where splits n = unfoldr (\xs -> if L.null xs then Nothing else Just (L.splitAt n xs)) -unchunk :: L.ByteString -> (L.ByteString, L.ByteString -- ^ the trailer part, unparsed, plus the final \r\n+unchunk :: L.ByteString -> (L.ByteString, L.ByteString -- the trailer part, unparsed, plus the final \r\n ,L.ByteString) unchunk bs = let (parts,tr,rest) = consumeChunksImpl bs in (L.concat . map clean $ parts,tr, rest)