The request path
-
Configuration
main.rsloads the selected YAML, TOML, or JSON file, then resolves the listen address, worker count, and optional TLS files. -
Connection acceptance
server.rs runs a Tokio runtime, accepts TCP connections, and spawns an asynchronous Hyper connection task for each one.
-
TLS handshake
With TLS configured, rustls validates credentials and optionally authenticates a client certificate before HTTP parsing.
-
HTTP parsing
Hyper parses HTTP/1.x or HTTP/2 messages. Pixie's handler accepts GET or HEAD and passes the URL path to the router.
-
Route and file
The router maps a simple page name to an HTML file under the selected web root.
-
Response
Hyper writes the status, content type, content length, and body. HTTP/1 connections close after the response; HTTP/2 follows stream semantics. HEAD omits the body.