The Host header becomes the lookup key for this toy virtual-host table.

highlighted = computed this step

Host is one exact header

The parsed Host value is net.example. The server does not guess it from the path.

Host=net.example\text{Host}=\text{net.example}
Host headerThe HTTP request and virtual-host rows are recomputed from pinned bytes.Host header - 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

Host and path stay separate

The path is /books, while the Host header is net.example.

/books on net.example\text{/books on net.example}
Host headerThe HTTP request and virtual-host rows are recomputed from pinned bytes.Host header - 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 Host value becomes the lookup key

The next chapter compares the Host value against the virtual-host rows.

lookup key=Host\text{lookup key}=\text{Host}
Host headerThe HTTP request and virtual-host rows are recomputed from pinned bytes.Host header - 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 request bytes produce one exact Host value for the server to route.

Host parsed exactly\text{Host parsed exactly}
Host headerThe HTTP request and virtual-host rows are recomputed from pinned bytes.Host header - 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