snap-core 1.0.3.2 → 1.0.4.0
raw patch · 4 files changed
+57/−19 lines, 4 filesdep ~basedep ~hashabledep ~networkPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, hashable, network
API changes (from Hackage documentation)
- Snap.Internal.Core: instance GHC.Exception.Exception Snap.Internal.Core.EscapeSnap
- Snap.Internal.Core: instance GHC.Exception.Exception Snap.Internal.Core.NoHandlerException
- Snap.Util.GZip: instance GHC.Exception.Exception Snap.Util.GZip.BadAcceptEncodingException
+ Snap.Internal.Core: CONNECT :: Method
+ Snap.Internal.Core: Cookie :: !ByteString -> !ByteString -> !Maybe UTCTime -> !Maybe ByteString -> !Maybe ByteString -> !Bool -> !Bool -> Cookie
+ Snap.Internal.Core: DELETE :: Method
+ Snap.Internal.Core: GET :: Method
+ Snap.Internal.Core: HEAD :: Method
+ Snap.Internal.Core: Method :: ByteString -> Method
+ Snap.Internal.Core: OPTIONS :: Method
+ Snap.Internal.Core: PATCH :: Method
+ Snap.Internal.Core: POST :: Method
+ Snap.Internal.Core: PUT :: Method
+ Snap.Internal.Core: Request :: ByteString -> ByteString -> {-# UNPACK #-} !Int -> ByteString -> {-# UNPACK #-} !Int -> ByteString -> !Bool -> Headers -> InputStream ByteString -> !Maybe Word64 -> !Method -> {-# UNPACK #-} !HttpVersion -> [Cookie] -> ByteString -> ByteString -> ByteString -> ByteString -> Params -> Params -> Params -> Request
+ Snap.Internal.Core: Response :: Headers -> Map ByteString Cookie -> !Maybe Word64 -> ResponseBody -> !Int -> !ByteString -> !Bool -> Response
+ Snap.Internal.Core: SendFile :: FilePath -> Maybe (Word64, Word64) -> ResponseBody
+ Snap.Internal.Core: Stream :: StreamProc -> ResponseBody
+ Snap.Internal.Core: TRACE :: Method
+ Snap.Internal.Core: [cookieDomain] :: Cookie -> !Maybe ByteString
+ Snap.Internal.Core: [cookieExpires] :: Cookie -> !Maybe UTCTime
+ Snap.Internal.Core: [cookieHttpOnly] :: Cookie -> !Bool
+ Snap.Internal.Core: [cookieName] :: Cookie -> !ByteString
+ Snap.Internal.Core: [cookiePath] :: Cookie -> !Maybe ByteString
+ Snap.Internal.Core: [cookieSecure] :: Cookie -> !Bool
+ Snap.Internal.Core: [cookieValue] :: Cookie -> !ByteString
+ Snap.Internal.Core: [rqBody] :: Request -> InputStream ByteString
+ Snap.Internal.Core: [rqClientAddr] :: Request -> ByteString
+ Snap.Internal.Core: [rqClientPort] :: Request -> {-# UNPACK #-} !Int
+ Snap.Internal.Core: [rqContentLength] :: Request -> !Maybe Word64
+ Snap.Internal.Core: [rqContextPath] :: Request -> ByteString
+ Snap.Internal.Core: [rqCookies] :: Request -> [Cookie]
+ Snap.Internal.Core: [rqHeaders] :: Request -> Headers
+ Snap.Internal.Core: [rqHostName] :: Request -> ByteString
+ Snap.Internal.Core: [rqIsSecure] :: Request -> !Bool
+ Snap.Internal.Core: [rqLocalHostname] :: Request -> ByteString
+ Snap.Internal.Core: [rqMethod] :: Request -> !Method
+ Snap.Internal.Core: [rqParams] :: Request -> Params
+ Snap.Internal.Core: [rqPathInfo] :: Request -> ByteString
+ Snap.Internal.Core: [rqPostParams] :: Request -> Params
+ Snap.Internal.Core: [rqQueryParams] :: Request -> Params
+ Snap.Internal.Core: [rqQueryString] :: Request -> ByteString
+ Snap.Internal.Core: [rqServerAddr] :: Request -> ByteString
+ Snap.Internal.Core: [rqServerPort] :: Request -> {-# UNPACK #-} !Int
+ Snap.Internal.Core: [rqURI] :: Request -> ByteString
+ Snap.Internal.Core: [rqVersion] :: Request -> {-# UNPACK #-} !HttpVersion
+ Snap.Internal.Core: [rspBody] :: Response -> ResponseBody
+ Snap.Internal.Core: [rspContentLength] :: Response -> !Maybe Word64
+ Snap.Internal.Core: [rspCookies] :: Response -> Map ByteString Cookie
+ Snap.Internal.Core: [rspHeaders] :: Response -> Headers
+ Snap.Internal.Core: [rspStatusReason] :: Response -> !ByteString
+ Snap.Internal.Core: [rspStatus] :: Response -> !Int
+ Snap.Internal.Core: [rspTransformingRqBody] :: Response -> !Bool
+ Snap.Internal.Core: addHeader :: HasHeaders a => CI ByteString -> ByteString -> a -> a
+ Snap.Internal.Core: addResponseCookie :: Cookie -> Response -> Response
+ Snap.Internal.Core: class HasHeaders a
+ Snap.Internal.Core: clearContentLength :: Response -> Response
+ Snap.Internal.Core: data Cookie
+ Snap.Internal.Core: data Method
+ Snap.Internal.Core: data Request
+ Snap.Internal.Core: data Response
+ Snap.Internal.Core: data ResponseBody
+ Snap.Internal.Core: deleteHeader :: HasHeaders a => CI ByteString -> a -> a
+ Snap.Internal.Core: deleteResponseCookie :: ByteString -> Response -> Response
+ Snap.Internal.Core: emptyResponse :: Response
+ Snap.Internal.Core: formatHttpTime :: CTime -> IO ByteString
+ Snap.Internal.Core: formatLogTime :: CTime -> IO ByteString
+ Snap.Internal.Core: getHeader :: HasHeaders a => CI ByteString -> a -> Maybe ByteString
+ Snap.Internal.Core: getResponseCookie :: ByteString -> Response -> Maybe Cookie
+ Snap.Internal.Core: getResponseCookies :: Response -> [Cookie]
+ Snap.Internal.Core: headers :: HasHeaders a => a -> Headers
+ Snap.Internal.Core: instance GHC.Exception.Type.Exception Snap.Internal.Core.EscapeSnap
+ Snap.Internal.Core: instance GHC.Exception.Type.Exception Snap.Internal.Core.NoHandlerException
+ Snap.Internal.Core: listHeaders :: HasHeaders a => a -> [(CI ByteString, ByteString)]
+ Snap.Internal.Core: modifyResponseBody :: ((OutputStream Builder -> IO (OutputStream Builder)) -> OutputStream Builder -> IO (OutputStream Builder)) -> Response -> Response
+ Snap.Internal.Core: modifyResponseCookie :: ByteString -> (Cookie -> Cookie) -> Response -> Response
+ Snap.Internal.Core: normalizeMethod :: Method -> Method
+ Snap.Internal.Core: parseHttpTime :: ByteString -> IO CTime
+ Snap.Internal.Core: rqModifyParams :: (Params -> Params) -> Request -> Request
+ Snap.Internal.Core: rqParam :: ByteString -> Request -> Maybe [ByteString]
+ Snap.Internal.Core: rqPostParam :: ByteString -> Request -> Maybe [ByteString]
+ Snap.Internal.Core: rqQueryParam :: ByteString -> Request -> Maybe [ByteString]
+ Snap.Internal.Core: rqSetParam :: ByteString -> [ByteString] -> Request -> Request
+ Snap.Internal.Core: rspBodyMap :: (StreamProc -> StreamProc) -> ResponseBody -> ResponseBody
+ Snap.Internal.Core: rspBodyToEnum :: ResponseBody -> StreamProc
+ Snap.Internal.Core: setContentLength :: Word64 -> Response -> Response
+ Snap.Internal.Core: setContentType :: ByteString -> Response -> Response
+ Snap.Internal.Core: setHeader :: HasHeaders a => CI ByteString -> ByteString -> a -> a
+ Snap.Internal.Core: setResponseBody :: (OutputStream Builder -> IO (OutputStream Builder)) -> Response -> Response
+ Snap.Internal.Core: setResponseCode :: Int -> Response -> Response
+ Snap.Internal.Core: setResponseStatus :: Int -> ByteString -> Response -> Response
+ Snap.Internal.Core: statusReasonMap :: IntMap ByteString
+ Snap.Internal.Core: type HttpVersion = (Int, Int)
+ Snap.Internal.Core: type Params = Map ByteString [ByteString]
+ Snap.Internal.Core: type StreamProc = OutputStream Builder -> IO (OutputStream Builder)
+ Snap.Internal.Core: updateHeaders :: HasHeaders a => (Headers -> Headers) -> a -> a
+ Snap.Util.GZip: instance GHC.Exception.Type.Exception Snap.Util.GZip.BadAcceptEncodingException
- Snap.Core: Cookie :: !ByteString -> !ByteString -> !(Maybe UTCTime) -> !(Maybe ByteString) -> !(Maybe ByteString) -> !Bool -> !Bool -> Cookie
+ Snap.Core: Cookie :: !ByteString -> !ByteString -> !Maybe UTCTime -> !Maybe ByteString -> !Maybe ByteString -> !Bool -> !Bool -> Cookie
- Snap.Core: [cookieDomain] :: Cookie -> !(Maybe ByteString)
+ Snap.Core: [cookieDomain] :: Cookie -> !Maybe ByteString
- Snap.Core: [cookieExpires] :: Cookie -> !(Maybe UTCTime)
+ Snap.Core: [cookieExpires] :: Cookie -> !Maybe UTCTime
- Snap.Core: [cookiePath] :: Cookie -> !(Maybe ByteString)
+ Snap.Core: [cookiePath] :: Cookie -> !Maybe ByteString
- Snap.Core: addHeader :: (HasHeaders a) => CI ByteString -> ByteString -> a -> a
+ Snap.Core: addHeader :: HasHeaders a => CI ByteString -> ByteString -> a -> a
- Snap.Core: deleteHeader :: (HasHeaders a) => CI ByteString -> a -> a
+ Snap.Core: deleteHeader :: HasHeaders a => CI ByteString -> a -> a
- Snap.Core: expireCookie :: (MonadSnap m) => Cookie -> m ()
+ Snap.Core: expireCookie :: MonadSnap m => Cookie -> m ()
- Snap.Core: getHeader :: (HasHeaders a) => CI ByteString -> a -> Maybe ByteString
+ Snap.Core: getHeader :: HasHeaders a => CI ByteString -> a -> Maybe ByteString
- Snap.Core: listHeaders :: (HasHeaders a) => a -> [(CI ByteString, ByteString)]
+ Snap.Core: listHeaders :: HasHeaders a => a -> [(CI ByteString, ByteString)]
- Snap.Core: modifyResponseBody :: ((OutputStream Builder -> IO (OutputStream Builder)) -> (OutputStream Builder -> IO (OutputStream Builder))) -> Response -> Response
+ Snap.Core: modifyResponseBody :: ((OutputStream Builder -> IO (OutputStream Builder)) -> OutputStream Builder -> IO (OutputStream Builder)) -> Response -> Response
- Snap.Core: rqContentLength :: Request -> (Maybe Word64)
+ Snap.Core: rqContentLength :: Request -> Maybe Word64
- Snap.Core: sendFile :: (MonadSnap m) => FilePath -> m ()
+ Snap.Core: sendFile :: MonadSnap m => FilePath -> m ()
- Snap.Core: sendFilePartial :: (MonadSnap m) => FilePath -> (Word64, Word64) -> m ()
+ Snap.Core: sendFilePartial :: MonadSnap m => FilePath -> (Word64, Word64) -> m ()
- Snap.Core: setHeader :: (HasHeaders a) => CI ByteString -> ByteString -> a -> a
+ Snap.Core: setHeader :: HasHeaders a => CI ByteString -> ByteString -> a -> a
- Snap.Core: type EscapeHttpHandler = ((Int -> Int) -> IO ()) timeout modifier -> InputStream ByteString socket read end -> OutputStream Builder socket write end -> IO ()
+ Snap.Core: type EscapeHttpHandler = ((Int -> Int) -> IO ()) " timeout modifier" -> InputStream ByteString " socket read end" -> OutputStream Builder " socket write end" -> IO ()
- Snap.Internal.Core: expireCookie :: (MonadSnap m) => Cookie -> m ()
+ Snap.Internal.Core: expireCookie :: MonadSnap m => Cookie -> m ()
- Snap.Internal.Core: sendFile :: (MonadSnap m) => FilePath -> m ()
+ Snap.Internal.Core: sendFile :: MonadSnap m => FilePath -> m ()
- Snap.Internal.Core: sendFilePartial :: (MonadSnap m) => FilePath -> (Word64, Word64) -> m ()
+ Snap.Internal.Core: sendFilePartial :: MonadSnap m => FilePath -> (Word64, Word64) -> m ()
- Snap.Internal.Core: type EscapeHttpHandler = ((Int -> Int) -> IO ()) timeout modifier -> InputStream ByteString socket read end -> OutputStream Builder socket write end -> IO ()
+ Snap.Internal.Core: type EscapeHttpHandler = ((Int -> Int) -> IO ()) " timeout modifier" -> InputStream ByteString " socket read end" -> OutputStream Builder " socket write end" -> IO ()
- Snap.Internal.Http.Types: Cookie :: !ByteString -> !ByteString -> !(Maybe UTCTime) -> !(Maybe ByteString) -> !(Maybe ByteString) -> !Bool -> !Bool -> Cookie
+ Snap.Internal.Http.Types: Cookie :: !ByteString -> !ByteString -> !Maybe UTCTime -> !Maybe ByteString -> !Maybe ByteString -> !Bool -> !Bool -> Cookie
- Snap.Internal.Http.Types: Request :: ByteString -> ByteString -> {-# UNPACK #-} !Int -> ByteString -> {-# UNPACK #-} !Int -> ByteString -> !Bool -> Headers -> InputStream ByteString -> !(Maybe Word64) -> !Method -> {-# UNPACK #-} !HttpVersion -> [Cookie] -> ByteString -> ByteString -> ByteString -> ByteString -> Params -> Params -> Params -> Request
+ Snap.Internal.Http.Types: Request :: ByteString -> ByteString -> {-# UNPACK #-} !Int -> ByteString -> {-# UNPACK #-} !Int -> ByteString -> !Bool -> Headers -> InputStream ByteString -> !Maybe Word64 -> !Method -> {-# UNPACK #-} !HttpVersion -> [Cookie] -> ByteString -> ByteString -> ByteString -> ByteString -> Params -> Params -> Params -> Request
- Snap.Internal.Http.Types: Response :: Headers -> Map ByteString Cookie -> !(Maybe Word64) -> ResponseBody -> !Int -> !ByteString -> !Bool -> Response
+ Snap.Internal.Http.Types: Response :: Headers -> Map ByteString Cookie -> !Maybe Word64 -> ResponseBody -> !Int -> !ByteString -> !Bool -> Response
- Snap.Internal.Http.Types: SendFile :: FilePath -> (Maybe (Word64, Word64)) -> ResponseBody
+ Snap.Internal.Http.Types: SendFile :: FilePath -> Maybe (Word64, Word64) -> ResponseBody
- Snap.Internal.Http.Types: Stream :: (StreamProc) -> ResponseBody
+ Snap.Internal.Http.Types: Stream :: StreamProc -> ResponseBody
- Snap.Internal.Http.Types: [cookieDomain] :: Cookie -> !(Maybe ByteString)
+ Snap.Internal.Http.Types: [cookieDomain] :: Cookie -> !Maybe ByteString
- Snap.Internal.Http.Types: [cookieExpires] :: Cookie -> !(Maybe UTCTime)
+ Snap.Internal.Http.Types: [cookieExpires] :: Cookie -> !Maybe UTCTime
- Snap.Internal.Http.Types: [cookiePath] :: Cookie -> !(Maybe ByteString)
+ Snap.Internal.Http.Types: [cookiePath] :: Cookie -> !Maybe ByteString
- Snap.Internal.Http.Types: [rqContentLength] :: Request -> !(Maybe Word64)
+ Snap.Internal.Http.Types: [rqContentLength] :: Request -> !Maybe Word64
- Snap.Internal.Http.Types: [rspContentLength] :: Response -> !(Maybe Word64)
+ Snap.Internal.Http.Types: [rspContentLength] :: Response -> !Maybe Word64
- Snap.Internal.Http.Types: addHeader :: (HasHeaders a) => CI ByteString -> ByteString -> a -> a
+ Snap.Internal.Http.Types: addHeader :: HasHeaders a => CI ByteString -> ByteString -> a -> a
- Snap.Internal.Http.Types: deleteHeader :: (HasHeaders a) => CI ByteString -> a -> a
+ Snap.Internal.Http.Types: deleteHeader :: HasHeaders a => CI ByteString -> a -> a
- Snap.Internal.Http.Types: getHeader :: (HasHeaders a) => CI ByteString -> a -> Maybe ByteString
+ Snap.Internal.Http.Types: getHeader :: HasHeaders a => CI ByteString -> a -> Maybe ByteString
- Snap.Internal.Http.Types: listHeaders :: (HasHeaders a) => a -> [(CI ByteString, ByteString)]
+ Snap.Internal.Http.Types: listHeaders :: HasHeaders a => a -> [(CI ByteString, ByteString)]
- Snap.Internal.Http.Types: modifyResponseBody :: ((OutputStream Builder -> IO (OutputStream Builder)) -> (OutputStream Builder -> IO (OutputStream Builder))) -> Response -> Response
+ Snap.Internal.Http.Types: modifyResponseBody :: ((OutputStream Builder -> IO (OutputStream Builder)) -> OutputStream Builder -> IO (OutputStream Builder)) -> Response -> Response
- Snap.Internal.Http.Types: setHeader :: (HasHeaders a) => CI ByteString -> ByteString -> a -> a
+ Snap.Internal.Http.Types: setHeader :: HasHeaders a => CI ByteString -> ByteString -> a -> a
- Snap.Internal.Parsing: toTable :: (Char -> Bool) -> (Char -> Bool)
+ Snap.Internal.Parsing: toTable :: (Char -> Bool) -> Char -> Bool
- Snap.Test: addCookies :: (Monad m) => [Cookie] -> RequestBuilder m ()
+ Snap.Test: addCookies :: Monad m => [Cookie] -> RequestBuilder m ()
- Snap.Test: addHeader :: (Monad m) => CI ByteString -> ByteString -> RequestBuilder m ()
+ Snap.Test: addHeader :: Monad m => CI ByteString -> ByteString -> RequestBuilder m ()
- Snap.Test: setHeader :: (Monad m) => CI ByteString -> ByteString -> RequestBuilder m ()
+ Snap.Test: setHeader :: Monad m => CI ByteString -> ByteString -> RequestBuilder m ()
- Snap.Util.FileUploads: foldMultipart :: (MonadSnap m) => UploadPolicy -> PartFold a -> a -> m ([FormParam], a)
+ Snap.Util.FileUploads: foldMultipart :: MonadSnap m => UploadPolicy -> PartFold a -> a -> m ([FormParam], a)
- Snap.Util.FileUploads: handleFileUploads :: (MonadSnap m) => FilePath -> UploadPolicy -> (PartInfo -> PartUploadPolicy) -> (PartInfo -> Either PolicyViolationException FilePath -> IO a) -> m [a]
+ Snap.Util.FileUploads: handleFileUploads :: MonadSnap m => FilePath -> UploadPolicy -> (PartInfo -> PartUploadPolicy) -> (PartInfo -> Either PolicyViolationException FilePath -> IO a) -> m [a]
- Snap.Util.FileUploads: handleFormUploads :: (MonadSnap m) => UploadPolicy -> FileUploadPolicy -> (PartInfo -> InputStream ByteString -> IO a) -> m ([FormParam], [FormFile a])
+ Snap.Util.FileUploads: handleFormUploads :: MonadSnap m => UploadPolicy -> FileUploadPolicy -> (PartInfo -> InputStream ByteString -> IO a) -> m ([FormParam], [FormFile a])
- Snap.Util.FileUploads: handleMultipart :: (MonadSnap m) => UploadPolicy -> PartProcessor a -> m [a]
+ Snap.Util.FileUploads: handleMultipart :: MonadSnap m => UploadPolicy -> PartProcessor a -> m [a]
- Snap.Util.FileUploads: partFileName :: PartInfo -> (Maybe ByteString)
+ Snap.Util.FileUploads: partFileName :: PartInfo -> Maybe ByteString
Files
- snap-core.cabal +8/−8
- src/Snap/Internal/Http/Types.hs +42/−7
- src/Snap/Internal/Util/FileServe.hs +6/−3
- src/Snap/Internal/Util/FileUploads.hs +1/−1
snap-core.cabal view
@@ -1,5 +1,5 @@ name: snap-core-version: 1.0.3.2+version: 1.0.4.0 synopsis: Snap: A Haskell Web Framework (core interfaces and types) description:@@ -35,7 +35,7 @@ bug-reports: https://github.com/snapframework/snap-core/issues category: Web, Snap, IO-Streams Tested-With: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3,- GHC == 8.0.1, GHC == 8.2.1, GHC == 8.4.1+ GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.3 extra-source-files: test/TestSuite.hs,@@ -147,7 +147,7 @@ readable >= 0.1 && < 0.4, regex-posix >= 0.95 && < 1, text >= 0.11 && < 1.3,- time >= 1.0 && < 1.9,+ time >= 1.0 && < 1.10, transformers >= 0.3 && < 0.6, transformers-base >= 0.4 && < 0.5, unix-compat >= 0.3 && < 0.6,@@ -185,7 +185,7 @@ if flag(network-uri) build-depends: network-uri >= 2.6 && < 2.7,- network >= 2.6 && < 2.7+ network >= 2.6 && < 3.1 else build-depends: network-uri >= 2.5 && < 2.6, network >= 2.3 && < 2.6@@ -273,11 +273,11 @@ zlib >= 0.5 && <0.7 if flag(network-uri)- build-depends: network-uri >= 2.6 && < 2.7,- network >= 2.6 && < 2.7+ build-depends: network-uri,+ network else- build-depends: network-uri >= 2.5 && < 2.6,- network >= 2.3 && < 2.6+ build-depends: network-uri,+ network ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -threaded -fno-warn-unused-do-bind
src/Snap/Internal/Http/Types.hs view
@@ -1310,10 +1310,16 @@ ------------------------------------------------------------------------------+-- | Adapted from:+--+-- <https://www.iana.org/assignments/http-status-codes/http-status-codes.txt> statusReasonMap :: IM.IntMap ByteString statusReasonMap = IM.fromList [ (100, "Continue"), (101, "Switching Protocols"),+ (102, "Processing"),+ (103, "Early Hints"),+ -- 104-199 Unassigned (200, "OK"), (201, "Created"), (202, "Accepted"),@@ -1321,13 +1327,21 @@ (204, "No Content"), (205, "Reset Content"), (206, "Partial Content"),+ (207, "Multi-Status"),+ (208, "Already Reported"),+ -- 209-225 Unassigned+ (226, "IM Used"),+ -- 227-299 Unassigned, (300, "Multiple Choices"), (301, "Moved Permanently"), (302, "Found"), (303, "See Other"), (304, "Not Modified"), (305, "Use Proxy"),+ (306, "(Unused)"), (307, "Temporary Redirect"),+ (308, "Permanent Redirect"),+ -- 309-399 Unassigned (400, "Bad Request"), (401, "Unauthorized"), (402, "Payment Required"),@@ -1336,24 +1350,45 @@ (405, "Method Not Allowed"), (406, "Not Acceptable"), (407, "Proxy Authentication Required"),- (408, "Request Time-out"),+ (408, "Request Timeout"), (409, "Conflict"), (410, "Gone"), (411, "Length Required"), (412, "Precondition Failed"),- (413, "Request Entity Too Large"),- (414, "Request-URI Too Large"),+ (413, "Payload Too Large"),+ (414, "URI Too Long"), (415, "Unsupported Media Type"),- (416, "Requested range not satisfiable"),+ (416, "Range Not Satisfiable"), (417, "Expectation Failed"),+ -- 418-420 Unassigned+ (421, "Misdirected Request"),+ (422, "Unprocessable Entity"),+ (423, "Locked"),+ (424, "Failed Dependency"),+ (425, "Too Early"),+ (426, "Upgrade Required"),+ -- 427 Unassigned+ (428, "Precondition Required"),+ (429, "Too Many Requests"),+ -- 430 Unassigned+ (431, "Request Header Fields Too Large"),+ -- 432-450 Unassigned+ (451, "Unavailable For Legal Reasons"),+ -- 452-499 Unassigned (500, "Internal Server Error"), (501, "Not Implemented"), (502, "Bad Gateway"), (503, "Service Unavailable"),- (504, "Gateway Time-out"),- (505, "HTTP Version not supported")+ (504, "Gateway Timeout"),+ (505, "HTTP Version Not Supported"),+ (506, "Variant Also Negotiates"),+ (507, "Insufficient Storage"),+ (508, "Loop Detected"),+ -- 509 Unassigned+ (510, "Not Extended"),+ (511, "Network Authentication Required")+ -- 512-599 Unassigned ]- ------------------------------------------------------------------------------ -- Deprecated functions
src/Snap/Internal/Util/FileServe.hs view
@@ -120,6 +120,7 @@ -- > ( ".conf" , "text/plain" ), -- > ( ".cpp" , "text/plain" ), -- > ( ".css" , "text/css" ),+-- > ( ".csv" , "text/csv" ), -- > ( ".cxx" , "text/plain" ), -- > ( ".doc" , "application/msword" ), -- > ( ".docx" , S.append "application/vnd.openxmlformats-officedocument"@@ -177,9 +178,9 @@ -- > ( ".tar.gz" , "application/x-tgz" ), -- > ( ".tbz" , "application/x-bzip-compressed-tar" ), -- > ( ".text" , "text/plain" ),+-- > ( ".tgz" , "application/x-tgz" ), -- > ( ".tif" , "image/tiff" ), -- > ( ".tiff" , "image/tiff" ),--- > ( ".tgz" , "application/x-tgz" ), -- > ( ".torrent" , "application/x-bittorrent" ), -- > ( ".ts" , "video/mp2t" ), -- > ( ".txt" , "text/plain" ),@@ -216,6 +217,7 @@ ( ".conf" , "text/plain" ), ( ".cpp" , "text/plain" ), ( ".css" , "text/css" ),+ ( ".csv" , "text/csv" ), ( ".cxx" , "text/plain" ), ( ".doc" , "application/msword" ), ( ".docx" , S.append "application/vnd.openxmlformats-officedocument"@@ -273,11 +275,12 @@ ( ".tar.gz" , "application/x-tgz" ), ( ".tbz" , "application/x-bzip-compressed-tar" ), ( ".text" , "text/plain" ),- ( ".tif" , "image/tiff" ),- ( ".tiff" , "image/tiff" ), ( ".tgz" , "application/x-tgz" ),+ ( ".tiff" , "image/tiff" ),+ ( ".tif" , "image/tiff" ), ( ".torrent" , "application/x-bittorrent" ), ( ".ts" , "video/mp2t" ),+ ( ".ttf" , "font/ttf" ), ( ".txt" , "text/plain" ), ( ".wav" , "audio/x-wav" ), ( ".wax" , "audio/x-ms-wax" ),
src/Snap/Internal/Util/FileUploads.hs view
@@ -770,7 +770,7 @@ --------------------------------------------------------------------------------- | Allows the file to be uploaded, with maximum size /n/.+-- | Allows the file to be uploaded, with maximum size /n/ in bytes. allowWithMaximumSize :: Int64 -> PartUploadPolicy allowWithMaximumSize = PartUploadPolicy . Just