Skip to main content

Module http

Module http 

Source
Expand description

Request validation primitives for static/read-only serving.

These types decouple HTTP method and body-framing validation from the server loop so callers can pre-validate requests without depending on Hyper types.

Enums§

ReadOnlyMethod
Supported read-only HTTP methods for static file serving.
RequestValidationError
Errors from request validation.

Functions§

validate_method
Check if a method string is a supported read-only method.
validate_request_body
Validate that a request has no body, as expected for GET/HEAD.
validate_request_target
Validate a request target is valid origin-form (starts with /).