The matching Host row selects the site for this toy request.

highlighted = computed this step

The Host value matches the first row

Host net.example matches the first virtual-host row.

winner row=1\text{winner row}=1
Matching host winsThe virtual-host rows are recomputed from the parsed Host header.Matching host wins - Host net.example selects net-docssectionnamevaluecheckrequest linemethodGETparsedrequest linepath/booksparsedrequest lineversionHTTP/1.1parsedheaderHostnet.exampleexactheaderAccepttext/htmlexactvirtual hostHostnet.examplecompare rowsroutenet.examplenet-docsyes / yes / selectrouteshop.exampleshopno / no / skiproutedefaultfallbackyes / no / not reached

The selected site is net-docs

The matching row points to site net-docs.

site=net-docs\text{site}=\text{net-docs}
Matching host winsThe virtual-host rows are recomputed from the parsed Host header.Matching host wins - Host net.example selects net-docssectionnamevaluecheckrequest linemethodGETparsedrequest linepath/booksparsedrequest lineversionHTTP/1.1parsedheaderHostnet.exampleexactheaderAccepttext/htmlexactvirtual hostHostnet.examplecompare rowsroutenet.examplenet-docsyes / yes / selectrouteshop.exampleshopno / no / skiproutedefaultfallbackyes / no / not reached

Default is not reached

Because an exact Host row matched, the fallback row is not the winner.

default not reached\text{default not reached}
Matching host winsThe virtual-host rows are recomputed from the parsed Host header.Matching host wins - Host net.example selects net-docssectionnamevaluecheckrequest linemethodGETparsedrequest linepath/booksparsedrequest lineversionHTTP/1.1parsedheaderHostnet.exampleexactheaderAccepttext/htmlexactvirtual hostHostnet.examplecompare rowsroutenet.examplenet-docsyes / yes / selectrouteshop.exampleshopno / no / skiproutedefaultfallbackyes / no / not reached

Summary

The Host header picks net-docs from the virtual-host table.

Host picks site\text{Host picks site}
Matching host winsThe virtual-host rows are recomputed from the parsed Host header.Matching host wins - Host net.example selects net-docssectionnamevaluecheckrequest linemethodGETparsedrequest linepath/booksparsedrequest lineversionHTTP/1.1parsedheaderHostnet.exampleexactheaderAccepttext/htmlexactvirtual hostHostnet.examplecompare rowsroutenet.examplenet-docsyes / yes / selectrouteshop.exampleshopno / no / skiproutedefaultfallbackyes / no / not reached