A fast, light-weight web server for WAI applications.


Version on this page:
LTS Haskell 21.14:3.3.25
Stackage Nightly 2023-10-03:3.3.29
Latest on Hackage:3.3.29

See all snapshots warp appears in

MIT licensed by Michael Snoyman, Kazu Yamamoto, Matt Brown
Maintained by michael@snoyman.com
This version can be pinned in stack with:warp-,6121

Module documentation for

  • Network
    • Network.Wai
      • Network.Wai.Handler
        • Network.Wai.Handler.Warp
          • Network.Wai.Handler.Warp.Buffer
          • Network.Wai.Handler.Warp.Internal
          • Network.Wai.Handler.Warp.Timeout


The premier WAI handler. For more information, see Warp: A Haskell Web Server.



Added setFork.


Modify flushing of request bodies. Previously, regardless of the size of the request body, the entire body would be flushed. When uploading large files to a web app that does not accept such files (e.g., returns a 413 too large status), browsers would still send the entire request body and the servers will still receive it.

The new behavior is to detect if there is a large amount of data still to be consumed and, if so, immediately terminate the connection. In the case of chunked request bodies, up to a maximum number of bytes is consumed before the connection is terminated.

This is controlled by the new setting setMaximumBodyFlush. A value of @Nothing@ will return the original behavior of flushing the entire body.


WAI no longer uses conduit for its streaming interface.


The onOpen and onClose settings now provide the SockAddr of the client, and onOpen can return a Bool which will close the connection. The responseRaw response has been added, which provides a more elegant way to handle WebSockets than the previous settingsIntercept. The old settings accessors have been deprecated in favor of new setters, which will allow settings changes to be made in the future without breaking backwards compatibility.


ResourceT is not used anymore. Request and Response is now abstract data types. To use their constructors, Internal module should be imported.


Support for byte range requests.


Sockets now have FD_CLOEXEC set on them. This behavior is more secure, and the change should not affect the vast majority of use cases. However, it appeared that this is buggy and is fixed in 2.0.0.