HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulewai-extra-3.1.16Haskell2010

Network.Wai.Middleware.StreamFile

Since 3.0.4

  • 1 value
valuestreamFile :: Middleware
#

Convert ResponseFile type responses into ResponseStream type

Checks the response type, and if it's a ResponseFile, converts it into a ResponseStream. Other response types are passed through unchanged.

Converted responses get a Content-Length header.

Streaming a file will bypass a sendfile system call, and may be useful to work around systems without working sendfile implementations.

Since 3.0.4