packages feed

happstack-server 7.5.2 → 7.5.3

raw patch · 3 files changed

+18/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Happstack.Server.Internal.RFC822Headers: ContentDisposition :: String -> [(String, String)] -> ContentDisposition
+ Happstack.Server.Internal.RFC822Headers: ContentTransferEncoding :: String -> ContentTransferEncoding
+ Happstack.Server.Internal.RFC822Headers: ContentType :: String -> String -> [(String, String)] -> ContentType
+ Happstack.Server.Internal.RFC822Headers: [ctParameters] :: ContentType -> [(String, String)]
+ Happstack.Server.Internal.RFC822Headers: [ctSubtype] :: ContentType -> String
+ Happstack.Server.Internal.RFC822Headers: [ctType] :: ContentType -> String
+ Happstack.Server.Internal.RFC822Headers: data ContentDisposition
+ Happstack.Server.Internal.RFC822Headers: data ContentTransferEncoding
+ Happstack.Server.Internal.RFC822Headers: data ContentType
+ Happstack.Server.Internal.RFC822Headers: getContentDisposition :: Monad m => [Header] -> m ContentDisposition
+ Happstack.Server.Internal.RFC822Headers: getContentTransferEncoding :: Monad m => [Header] -> m ContentTransferEncoding
+ Happstack.Server.Internal.RFC822Headers: getContentType :: Monad m => [Header] -> m ContentType
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Classes.Eq Happstack.Server.Internal.RFC822Headers.ContentDisposition
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Classes.Eq Happstack.Server.Internal.RFC822Headers.ContentTransferEncoding
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Classes.Eq Happstack.Server.Internal.RFC822Headers.ContentType
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Classes.Ord Happstack.Server.Internal.RFC822Headers.ContentDisposition
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Classes.Ord Happstack.Server.Internal.RFC822Headers.ContentTransferEncoding
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Classes.Ord Happstack.Server.Internal.RFC822Headers.ContentType
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Read.Read Happstack.Server.Internal.RFC822Headers.ContentDisposition
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Read.Read Happstack.Server.Internal.RFC822Headers.ContentTransferEncoding
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Read.Read Happstack.Server.Internal.RFC822Headers.ContentType
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Show.Show Happstack.Server.Internal.RFC822Headers.ContentDisposition
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Show.Show Happstack.Server.Internal.RFC822Headers.ContentTransferEncoding
+ Happstack.Server.Internal.RFC822Headers: instance GHC.Show.Show Happstack.Server.Internal.RFC822Headers.ContentType
+ Happstack.Server.Internal.RFC822Headers: pHeader :: Parser Header
+ Happstack.Server.Internal.RFC822Headers: pHeaders :: Parser [Header]
+ Happstack.Server.Internal.RFC822Headers: parseContentDisposition :: Monad m => String -> m ContentDisposition
+ Happstack.Server.Internal.RFC822Headers: parseContentTransferEncoding :: Monad m => String -> m ContentTransferEncoding
+ Happstack.Server.Internal.RFC822Headers: parseContentType :: Monad m => String -> m ContentType
+ Happstack.Server.Internal.RFC822Headers: parseHeaders :: Monad m => SourceName -> String -> m [Header]
+ Happstack.Server.Internal.RFC822Headers: parseM :: Monad m => Parser a -> SourceName -> String -> m a
+ Happstack.Server.Internal.RFC822Headers: showContentType :: ContentType -> String
+ Happstack.Server.Internal.RFC822Headers: type Header = (String, String)

Files

happstack-server.cabal view
@@ -1,5 +1,5 @@ Name:                happstack-server-Version:             7.5.2+Version:             7.5.3 Synopsis:            Web related tools and services. Description:         Happstack Server provides an HTTP server and a rich set of functions for routing requests, handling query parameters, generating responses, working with cookies, serving files, and more. For in-depth documentation see the Happstack Crash Course <http://happstack.com/docs/crashcourse/index.html> License:             BSD3@@ -47,6 +47,7 @@                        Happstack.Server.Internal.LogFormat                        Happstack.Server.Internal.MessageWrap                        Happstack.Server.Internal.Multipart+                       Happstack.Server.Internal.RFC822Headers                        Happstack.Server.Internal.Socket                        Happstack.Server.Internal.TimeoutIO                        Happstack.Server.Internal.TimeoutManager@@ -64,7 +65,6 @@   Other-modules:                        Happstack.Server.Internal.Clock                        Happstack.Server.Internal.LazyLiner-                       Happstack.Server.Internal.RFC822Headers                        Happstack.Server.Internal.SocketTH                        Happstack.Server.SURI.ParseURI                        Paths_happstack_server
src/Happstack/Server/Internal/RFC822Headers.hs view
@@ -94,7 +94,11 @@      -- where nothing is escaped in the filename parameter      -- of the content-disposition header in multipart/form-data      let litStr = if p_name == "filename"-                   then buggyLiteralString+                   then choice [ try ((lookAhead $ do+                                        void (literalString >>+                                              p_parameter))+                                     >> literalString)+                               , buggyLiteralString]                    else literalString      p_value <- litStr <|> p_token      return (map toLower p_name, p_value)
tests/Happstack/Server/Tests.hs view
@@ -19,6 +19,7 @@ import Happstack.Server.Internal.Cookie import Happstack.Server.Internal.Multipart import Happstack.Server.Internal.MessageWrap+import Happstack.Server.Internal.RFC822Headers (ContentDisposition(..), parseContentDisposition) import Happstack.Server.SURI(ToSURI(..), path, query) import Test.HUnit as HU (Test(..), (~:), (@?=), (@=?), assertEqual) import Text.ParserCombinators.Parsec@@ -32,6 +33,7 @@                                 , compressFilterResponseTest                                 , matchMethodTest                                 , cookieHeaderOrderTest+                                , pContentDispositionFilename                                 ]  cookieParserTest :: Test@@ -236,3 +238,12 @@   where     gethead = [GET, HEAD]     others  = [POST, PUT, DELETE, TRACE, OPTIONS, CONNECT]+++-- | https://github.com/Happstack/happstack-server/pull/56+pContentDispositionFilename :: Test+pContentDispositionFilename =+  "pContentDispositionFilename" ~:+    do let doesNotWorkWithOldParserButWithNew = "form-data; filename=\"file.pdf\"; name=\"file\"" :: String+       c <- parseContentDisposition doesNotWorkWithOldParserButWithNew+       assertEqual "parseContentDisposition" c (ContentDisposition "form-data" [("filename","file.pdf"),("name","file")])