The label can come back in a later request.

highlighted = computed this step

The label is remembered for later

This toy model treats the cookie as a small label that can appear in a later request.

label kept for later\text{label kept for later}
Stored labelThe Set-Cookie response, later request, and match rows are recomputed from pinned bytes.Stored label - Set-Cookie sid=7 returns as Cookie sid=7sectionnamevaluecheckstatusstatus200 OKokheaderSet-Cookiesid=7; Path=/parsedcookienamesidlabelcookievalue7labelcookiePath/pinnedheaderContent-Length0no bodyrequest linemethodGETparsedrequest linepath/cartparsedrequest lineversionHTTP/1.1parsedheaderHostshop.exampleexactheaderCookiesid=7sent backcheckSet-Cookiesid=7from responsecheckCookiesid=7from requestcheckPath/pinnedcheckmatchyessame labelchecksent body bytes0empty body

It is not login in this book

The book does not claim authentication or session security. It only tracks exact header text.

header text only\text{header text only}
Stored labelThe Set-Cookie response, later request, and match rows are recomputed from pinned bytes.Stored label - Set-Cookie sid=7 returns as Cookie sid=7sectionnamevaluecheckstatusstatus200 OKokheaderSet-Cookiesid=7; Path=/parsedcookienamesidlabelcookievalue7labelcookiePath/pinnedheaderContent-Length0no bodyrequest linemethodGETparsedrequest linepath/cartparsedrequest lineversionHTTP/1.1parsedheaderHostshop.exampleexactheaderCookiesid=7sent backcheckSet-Cookiesid=7from responsecheckCookiesid=7from requestcheckPath/pinnedcheckmatchyessame labelchecksent body bytes0empty body

The next chapter sends it back

The later request row will show the matching Cookie header.

later request next\text{later request next}
Stored labelThe Set-Cookie response, later request, and match rows are recomputed from pinned bytes.Stored label - Set-Cookie sid=7 returns as Cookie sid=7sectionnamevaluecheckstatusstatus200 OKokheaderSet-Cookiesid=7; Path=/parsedcookienamesidlabelcookievalue7labelcookiePath/pinnedheaderContent-Length0no bodyrequest linemethodGETparsedrequest linepath/cartparsedrequest lineversionHTTP/1.1parsedheaderHostshop.exampleexactheaderCookiesid=7sent backcheckSet-Cookiesid=7from responsecheckCookiesid=7from requestcheckPath/pinnedcheckmatchyessame labelchecksent body bytes0empty body

Summary

Set-Cookie gives a small label that a later request can return.

label ready\text{label ready}
Stored labelThe Set-Cookie response, later request, and match rows are recomputed from pinned bytes.Stored label - Set-Cookie sid=7 returns as Cookie sid=7sectionnamevaluecheckstatusstatus200 OKokheaderSet-Cookiesid=7; Path=/parsedcookienamesidlabelcookievalue7labelcookiePath/pinnedheaderContent-Length0no bodyrequest linemethodGETparsedrequest linepath/cartparsedrequest lineversionHTTP/1.1parsedheaderHostshop.exampleexactheaderCookiesid=7sent backcheckSet-Cookiesid=7from responsecheckCookiesid=7from requestcheckPath/pinnedcheckmatchyessame labelchecksent body bytes0empty body