cheroot.test.test_header_folding module

Preserve HTTP header values across continuation lines.

class cheroot.test.test_header_folding._HeaderGateway(req)

Bases: Gateway

Echo the header selected by the request path.

respond() → None

Return the complete header value received by the application.

cheroot.test.test_header_folding.test_header_continuation_values(native_server: HTTPServer, http_request_timeout: float, header_name: bytes, header_lines: bytes, expected_value: bytes) → None

Preserve continuation values and repeated header fields.

Parameters:
  • native_server – live HTTP server

  • http_request_timeout – socket timeout in seconds

  • header_name – field to echo through the application

  • header_lines – header bytes including any continuation lines

  • expected_value – value required by the HTTP field rules