packages feed

hack-handler-simpleserver 0.2.0 → 0.2.0.1

raw patch · 2 files changed

+10/−5 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Hack/Handler/SimpleServer.hs view
@@ -100,13 +100,13 @@     let rpath = '/' : case SL.unpack rpath' of                         ('/':x) -> x                         _ -> SL.unpack rpath'-    let heads = map parseHeader $ tail lines'-        heads' = map (\(x, y, _) -> (SL.unpack x, SL.unpack y)) heads-    let host' = lookupHeader (SL.pack "Host") heads+    let heads = map parseHeaderNoAttr $ tail lines'+        heads' = map (\(x, y) -> (SL.unpack x, SL.unpack y)) heads+    let host' = lookup (SL.pack "Host") heads     unless (isJust host') $ failure HostNotIncluded     let host = fromJust host'     let len = maybe "0" SL.unpack-            $ lookupHeader (SL.pack "Content-Length") heads+            $ lookup (SL.pack "Content-Length") heads     let body'' = BL.take (safeRead 0 len) body'     let (serverName', _) = SL.breakChar ':' host     return $ Env@@ -161,3 +161,8 @@     hPutStr conn "\r\n"     BL.hPutStr conn $ content res -}++parseHeaderNoAttr :: StringLike a => a -> (a, a)+parseHeaderNoAttr s =+    let (k, rest) = SL.span (/= ':') s+     in (k, SL.dropPrefix' (SL.pack ": ") rest)
hack-handler-simpleserver.cabal view
@@ -1,5 +1,5 @@ name:            hack-handler-simpleserver-version:         0.2.0+version:         0.2.0.1 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>