SagaSaga
SagaHttp

Configuration

pub record Config { ... }
pub fun default_config : Config

Use record update to customise:

serve { default_config | port: 4000, max_body_size: 4 * 1024 * 1024 } handle

Fields, grouped by purpose:

Identity

FieldDefaultNotes
port8080TCP port to listen on
server_name"saga_http"Sent as Server: header; "" opts out

Framing limits

FieldDefaultNotes
max_body_size1048576Cap on request body bytes (CL or chunked total)
max_header_size8192Per-line cap (request line or any single header line)
max_chunk_line_size1024Cap on a chunk-size line (hex + optional ;ext)
max_trailer_size8192Cap on the trailer section after the final 0-chunk
max_request_headers_size65536Cap on cumulative request line + headers (slowloris defense)
max_header_count100Cap on number of headers in a request

Timeouts

FieldDefaultNotes
idle_timeout_ms30000Wait for next request on a keep-alive socket
read_timeout_ms30000Wait for individual reads mid-request (body, chunks, trailers)
total_body_timeout_ms60000Cumulative wall-clock deadline for reading one body

Capacity

FieldDefaultNotes
max_connections10000Simultaneously-tracked connections; over-cap sockets are dropped