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.ValidateHeaders

This module provides a middleware to validate response headers. RFC 9110 constrains the allowed octets in header names and values:

  • Header names are tokens, i.e. visible ASCII characters (octets 33 to 126 inclusive) except delimiters.

  • Header values should be limited to visible ASCII characters, the whitespace characters space and horizontal tab and octets 128 to 255. Headers values may not have trailing whitespace (see RFC 9110 Section 5.5). Folding is not allowed.

validateHeadersMiddleware enforces these constraints for response headers by responding with a 500 Internal Server Error when an offending character is present. This is meant to catch programmer errors early on and reduce attack surface.

  • 3 types
  • 2 values
  • Packagewai-extra-3.1.16
  • Exports5
  • LanguageHaskell2010
  • LicenceMIT
  • SourceValidateHeaders.hs

Middleware

1 declaration

Settings

2 declarations

Types

2 declarations