A blank line separates headers from body bytes.

highlighted = computed this step

A blank line separates headers from body

The trust boundary splits the request at the blank-line boundary.

split headers from body\text{split headers from body}
POST body boundaryThe POST request rows, body rows, field rows, and length check are recomputed from pinned bytes.POST body boundary - 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 form bytes come after the boundary

The body rows are computed only from bytes after that boundary.

body after headers\text{body after headers}
POST body boundaryThe POST request rows, body rows, field rows, and length check are recomputed from pinned bytes.POST body boundary - 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 form fields are not header lines

The body is counted separately from Host and Content-Type.

body is separate\text{body is separate}
POST body boundaryThe POST request rows, body rows, field rows, and length check are recomputed from pinned bytes.POST body boundary - 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

POST carries this toy form in the body, after the headers.

body boundary found\text{body boundary found}
POST body boundaryThe POST request rows, body rows, field rows, and length check are recomputed from pinned bytes.POST body boundary - 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