Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
setMaximumBodyFlush :: Maybe Int -> Settings -> Settingswarp Network.Wai.Handler.Warp The maximum number of bytes to flush from an unconsumed request body. By default, Warp does not flush the request body so that, if a large body is present, the connection is simply terminated instead of wasting time and bandwidth on transmitting it. However, some clients do not deal with that situation well. You can either change this setting to Nothing to flush the entire body in all cases, or in your application ensure that you always consume the entire request body. Default: 8192 bytes. Since 3.0.3
setNoParsePath :: Bool -> Settings -> Settingswarp Network.Wai.Handler.Warp Perform no parsing on the rawPathInfo. This is useful for writing HTTP proxies. Default: False Since 2.1.0
setOnClose :: (SockAddr -> IO ()) -> Settings -> Settingswarp Network.Wai.Handler.Warp What to do when a connection is closed. Default: do nothing. Since 2.1.0
setOnException :: (Maybe Request -> SomeException -> IO ()) -> Settings -> Settingswarp Network.Wai.Handler.Warp What to do with exceptions thrown by either the application or server. Default: defaultOnException Since 2.1.0
setOnExceptionResponse :: (SomeException -> Response) -> Settings -> Settingswarp Network.Wai.Handler.Warp A function to create a Response when an exception occurs. Default: defaultOnExceptionResponse Note that an application can handle its own exceptions without interfering with Warp:
myApp :: Application myApp request respond = innerApp `catch` onError where onError = respond . response500 request response500 :: Request -> SomeException -> Response response500 req someEx = responseLBS status500 -- ...
Since 2.1.0setOnOpen :: (SockAddr -> IO Bool) -> Settings -> Settingswarp Network.Wai.Handler.Warp What to do when a connection is opened. When False is returned, the connection is closed immediately. Otherwise, the connection is going on. Default: always returns True. Since 2.1.0
setPort :: Port -> Settings -> Settingswarp Network.Wai.Handler.Warp Port to listen on. Default value: 3000 Since 2.1.0
setProxyProtocolNone :: Settings -> Settingswarp Network.Wai.Handler.Warp Do not use the PROXY protocol. Since 3.0.5
setProxyProtocolOptional :: Settings -> Settingswarp Network.Wai.Handler.Warp Use the PROXY header if it exists, but also accept connections without the header. See setProxyProtocolRequired. WARNING: This is contrary to the PROXY protocol specification and using it can indicate a security problem with your architecture if the web server is directly accessible to the public, since it would allow easy IP address spoofing. However, it can be useful in some cases, such as if a load balancer health check uses regular HTTP without the PROXY header, but proxied connections do include the PROXY header. Since 3.0.5
setProxyProtocolRequired :: Settings -> Settingswarp Network.Wai.Handler.Warp Require PROXY header. This is for cases where a "dumb" TCP/SSL proxy is being used, which cannot add an X-Forwarded-For HTTP header field but has enabled support for the PROXY protocol. See http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt and http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#proxy-protocol. Only the human-readable header format (version 1) is supported. The binary header format (version 2) is not supported. Since 3.0.5