The toy request posts a small form.

highlighted = computed this step

The request uses POST

The request line says POST and names path /submit.

POST /submit\text{POST /submit}
POST request lineThe POST request rows, body rows, field rows, and length check are recomputed from pinned bytes.POST request line - POST /submit body 7 bytes, fields a=1 and b=2sectionnamevaluecheckrequest linemethodPOSTparsedrequest linepath/submitparsedrequest lineversionHTTP/1.1parsedheaderHostforms.exampleexactheaderContent-Typeapplication/x-www-form-urlencodedform encodingheaderContent-Length7declared bytesbodydisplay wordsa=1 ampersand b=2safe display formbodyexact hex613d3126623d32pinned bytesbodybyte length7countedfieldaa=1parsedfieldbb=2parsedcheckContent-Length7declaredcheckbody bytes7recomputedcheckmatchyessame count

The Host header names forms.example

The Host row pins the toy site that receives the form request.

Host=forms.example\text{Host}=\text{forms.example}
POST request lineThe POST request rows, body rows, field rows, and length check are recomputed from pinned bytes.POST request line - POST /submit body 7 bytes, fields a=1 and b=2sectionnamevaluecheckrequest linemethodPOSTparsedrequest linepath/submitparsedrequest lineversionHTTP/1.1parsedheaderHostforms.exampleexactheaderContent-Typeapplication/x-www-form-urlencodedform encodingheaderContent-Length7declared bytesbodydisplay wordsa=1 ampersand b=2safe display formbodyexact hex613d3126623d32pinned bytesbodybyte length7countedfieldaa=1parsedfieldbb=2parsedcheckContent-Length7declaredcheckbody bytes7recomputedcheckmatchyessame count

The Content-Type names form encoding

The Content-Type row says the body is a small URL-encoded form.

form content type\text{form content type}
POST request lineThe POST request rows, body rows, field rows, and length check are recomputed from pinned bytes.POST request line - POST /submit body 7 bytes, fields a=1 and b=2sectionnamevaluecheckrequest linemethodPOSTparsedrequest linepath/submitparsedrequest lineversionHTTP/1.1parsedheaderHostforms.exampleexactheaderContent-Typeapplication/x-www-form-urlencodedform encodingheaderContent-Length7declared bytesbodydisplay wordsa=1 ampersand b=2safe display formbodyexact hex613d3126623d32pinned bytesbodybyte length7countedfieldaa=1parsedfieldbb=2parsedcheckContent-Length7declaredcheckbody bytes7recomputedcheckmatchyessame count

Summary

The request line and headers tell us a body is coming.

headers before body\text{headers before body}
POST request lineThe POST request rows, body rows, field rows, and length check are recomputed from pinned bytes.POST request line - POST /submit body 7 bytes, fields a=1 and b=2sectionnamevaluecheckrequest linemethodPOSTparsedrequest linepath/submitparsedrequest lineversionHTTP/1.1parsedheaderHostforms.exampleexactheaderContent-Typeapplication/x-www-form-urlencodedform encodingheaderContent-Length7declared bytesbodydisplay wordsa=1 ampersand b=2safe display formbodyexact hex613d3126623d32pinned bytesbodybyte length7countedfieldaa=1parsedfieldbb=2parsedcheckContent-Length7declaredcheckbody bytes7recomputedcheckmatchyessame count