Safe Haskell | None |
---|---|
Language | Haskell98 |
- type Header = (HeaderName, ByteString)
- type HeaderName = CI ByteString
- type RequestHeaders = [Header]
- type ResponseHeaders = [Header]
- hAccept :: HeaderName
- hAcceptCharset :: HeaderName
- hAcceptEncoding :: HeaderName
- hAcceptLanguage :: HeaderName
- hAcceptRanges :: HeaderName
- hAge :: HeaderName
- hAllow :: HeaderName
- hAuthorization :: HeaderName
- hCacheControl :: HeaderName
- hConnection :: HeaderName
- hContentEncoding :: HeaderName
- hContentLanguage :: HeaderName
- hContentLength :: HeaderName
- hContentLocation :: HeaderName
- hContentMD5 :: HeaderName
- hContentRange :: HeaderName
- hContentType :: HeaderName
- hCookie :: HeaderName
- hDate :: HeaderName
- hETag :: HeaderName
- hExpect :: HeaderName
- hExpires :: HeaderName
- hFrom :: HeaderName
- hHost :: HeaderName
- hIfMatch :: HeaderName
- hIfModifiedSince :: HeaderName
- hIfNoneMatch :: HeaderName
- hIfRange :: HeaderName
- hIfUnmodifiedSince :: HeaderName
- hLastModified :: HeaderName
- hLocation :: HeaderName
- hMaxForwards :: HeaderName
- hPragma :: HeaderName
- hProxyAuthenticate :: HeaderName
- hProxyAuthorization :: HeaderName
- hRange :: HeaderName
- hReferer :: HeaderName
- hRetryAfter :: HeaderName
- hServer :: HeaderName
- hTE :: HeaderName
- hTrailer :: HeaderName
- hTransferEncoding :: HeaderName
- hUpgrade :: HeaderName
- hUserAgent :: HeaderName
- hVary :: HeaderName
- hVia :: HeaderName
- hWWWAuthenticate :: HeaderName
- hWarning :: HeaderName
- data ByteRange
- renderByteRangeBuilder :: ByteRange -> Builder
- renderByteRange :: ByteRange -> ByteString
- type ByteRanges = [ByteRange]
- renderByteRangesBuilder :: ByteRanges -> Builder
- renderByteRanges :: ByteRanges -> ByteString
- parseByteRanges :: ByteString -> Maybe ByteRanges
Types
type Header = (HeaderName, ByteString) Source #
Header
type HeaderName = CI ByteString Source #
Header name
type RequestHeaders = [Header] Source #
Request Headers
type ResponseHeaders = [Header] Source #
Response Headers
Common headers
hAccept :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hAcceptCharset :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hAcceptEncoding :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hAcceptLanguage :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hAcceptRanges :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hAge :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hAllow :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hAuthorization :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hCacheControl :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hConnection :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hContentEncoding :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hContentLanguage :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hContentLength :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hContentLocation :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hContentMD5 :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hContentRange :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hContentType :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hCookie :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hDate :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hETag :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hExpect :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hExpires :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hFrom :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hHost :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hIfMatch :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hIfModifiedSince :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hIfNoneMatch :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hIfRange :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hIfUnmodifiedSince :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hLastModified :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hLocation :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hMaxForwards :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hPragma :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hProxyAuthenticate :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hProxyAuthorization :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hRange :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hReferer :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hRetryAfter :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hServer :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hTE :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hTrailer :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hTransferEncoding :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hUpgrade :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hUserAgent :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hVary :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hVia :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hWWWAuthenticate :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
hWarning :: HeaderName Source #
HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Byte ranges
RFC 2616 Byte range (individual).
Negative indices are not allowed!
type ByteRanges = [ByteRange] Source #
RFC 2616 Byte ranges (set).
parseByteRanges :: ByteString -> Maybe ByteRanges Source #
Parse the value of a Range header into a ByteRanges
.
>>>
parseByteRanges "error"
Nothing>>>
parseByteRanges "bytes=0-499"
Just [ByteRangeFromTo 0 499]>>>
parseByteRanges "bytes=500-999"
Just [ByteRangeFromTo 500 999]>>>
parseByteRanges "bytes=-500"
Just [ByteRangeSuffix 500]>>>
parseByteRanges "bytes=9500-"
Just [ByteRangeFrom 9500]>>>
parseByteRanges "bytes=0-0,-1"
Just [ByteRangeFromTo 0 0,ByteRangeSuffix 1]>>>
parseByteRanges "bytes=500-600,601-999"
Just [ByteRangeFromTo 500 600,ByteRangeFromTo 601 999]>>>
parseByteRanges "bytes=500-700,601-999"
Just [ByteRangeFromTo 500 700,ByteRangeFromTo 601 999]