-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | WAI utilities for HTTP/2
--   
--   WAI utilities for HTTP/2
@package wai-http2-extra
@version 0.1.3

-- | Middleware for server push learning dependency based on Referer:.
module Network.Wai.Middleware.Push.Referer

-- | The middleware to push files based on Referer:. Learning strategy is
--   implemented in the first argument.
pushOnReferer :: Settings -> Middleware

-- | Type for URL path.
type URLPath = ByteString

-- | Making a push promise based on Referer:, path to be pushed and file to
--   be pushed. If the middleware should push this file in the next time
--   when the page of Referer: is accessed, this function should return
--   Just. If Nothing is returned, the middleware learns
--   nothing.
type MakePushPromise = URLPath -> URLPath -> FilePath -> IO Maybe PushPromise

-- | Learn if the file to be pushed is CSS (.css) or JavaScript (.js) file.
defaultMakePushPromise :: MakePushPromise

-- | Settings for server push based on Referer:.
data Settings

-- | Default settings.
defaultSettings :: Settings

-- | Default: defaultMakePushPromise
makePushPromise :: Settings -> MakePushPromise

-- | Deprecated
duration :: Settings -> Int

-- | Max number of keys (e.g. index.html) in the learning information.
--   Default: 20
keyLimit :: Settings -> Int

-- | Max number of values (e.g. style.css) in the learning information.
--   Default: 20
valueLimit :: Settings -> Int
