The toy request asks for the old path.

highlighted = computed this step

The request asks for the old path

The request line gives the method, path, and version. The path is /old.

path=/old\text{path}=\text{/old}
Redirect request pathThe request, rule, response, and redirect check rows are recomputed from pinned bytes.Redirect request path - /old -> /new with 302 Found, body 0 bytessectionnamevaluecheckrequest linemethodGETparsedrequest linepath/oldold pathrequest lineversionHTTP/1.1parsedheaderHostdocs.exampleexactheaderAccepttext/htmlexactredirect rulefrom/oldrequest pathredirect ruleto/newnext pathstatusversionHTTP/1.1parsedstatusstatus302 FoundredirectheaderLocation/newnext pathheaderContent-Length0no bodycheckrequest path/oldmatched rulechecknext path/newfrom Locationchecksent body bytes0empty body

The Host header names docs.example

The Host header and path together identify the toy page being requested.

Host=docs.example\text{Host}=\text{docs.example}
Redirect request pathThe request, rule, response, and redirect check rows are recomputed from pinned bytes.Redirect request path - /old -> /new with 302 Found, body 0 bytessectionnamevaluecheckrequest linemethodGETparsedrequest linepath/oldold pathrequest lineversionHTTP/1.1parsedheaderHostdocs.exampleexactheaderAccepttext/htmlexactredirect rulefrom/oldrequest pathredirect ruleto/newnext pathstatusversionHTTP/1.1parsedstatusstatus302 FoundredirectheaderLocation/newnext pathheaderContent-Length0no bodycheckrequest path/oldmatched rulechecknext path/newfrom Locationchecksent body bytes0empty body

The request accepts html

The Accept row is pinned too, but it does not decide the redirect in this toy example.

Accept parsed\text{Accept parsed}
Redirect request pathThe request, rule, response, and redirect check rows are recomputed from pinned bytes.Redirect request path - /old -> /new with 302 Found, body 0 bytessectionnamevaluecheckrequest linemethodGETparsedrequest linepath/oldold pathrequest lineversionHTTP/1.1parsedheaderHostdocs.exampleexactheaderAccepttext/htmlexactredirect rulefrom/oldrequest pathredirect ruleto/newnext pathstatusversionHTTP/1.1parsedstatusstatus302 FoundredirectheaderLocation/newnext pathheaderContent-Length0no bodycheckrequest path/oldmatched rulechecknext path/newfrom Locationchecksent body bytes0empty body

Summary

The server receives a request for /old.

/old requested\text{/old requested}
Redirect request pathThe request, rule, response, and redirect check rows are recomputed from pinned bytes.Redirect request path - /old -> /new with 302 Found, body 0 bytessectionnamevaluecheckrequest linemethodGETparsedrequest linepath/oldold pathrequest lineversionHTTP/1.1parsedheaderHostdocs.exampleexactheaderAccepttext/htmlexactredirect rulefrom/oldrequest pathredirect ruleto/newnext pathstatusversionHTTP/1.1parsedstatusstatus302 FoundredirectheaderLocation/newnext pathheaderContent-Length0no bodycheckrequest path/oldmatched rulechecknext path/newfrom Locationchecksent body bytes0empty body