Skip to main content

Module protocol

Module protocol 

Source

Structs§

DetectedRequest
Detected service name and action from an incoming HTTP request.
RoutingHost
Service + region (and optional bucket) decoded from a Host header. Covers both the LocalStack hostname convention (<service>.<region>.localhost.localstack.cloud[:port], <bucket>.s3.<region>.localhost.localstack.cloud[:port]) and real AWS service hostnames (<service>.<region>.amazonaws.com, S3 path-style and virtual-hosted-style including the legacy no-region s3.amazonaws.com / <bucket>.s3.amazonaws.com forms and the older dash-separated s3-<region>.amazonaws.com form).

Enums§

AwsProtocol
The wire protocol used by an AWS service.

Functions§

detect_service
Detect the target service and action from HTTP request components.
detect_service_headers_only
Header-only service detection. Skips the form-encoded body sniff so the dispatch path can decide whether to stream or buffer the body without first reading it. Returns None when only a body sniff would succeed; the caller must then fall back to detect_service after buffering. Used to opt streaming routes (S3 PutObject / UploadPart, ECR OCI v2 blob upload) out of the global body cap.
parse_query_body
Parse form-encoded body into key-value pairs.
parse_routing_host
Parse a Host header value for a LocalStack- or AWS-shaped hostname. Returns None for anything that doesn’t match — callers fall through to their existing detection path.
parse_routing_host_from_headers
Pull the Host header and parse it with parse_routing_host.