Once parsed, the parser should validate the relevant pieces of information it managed to get from the header, before proceeding to read body (and trailers). Such info involves:
allowed methods
access to a resource (does it exist? is it accessible?) based on location specified in a server block
autoindexing (ties to proper redirection or 200 response)
rules for message framing (TE or Content-Length? Are they valid header fields with valid field values?)
Once parsed, the parser should validate the relevant pieces of information it managed to get from the header, before proceeding to read body (and trailers). Such info involves: