Search code examples
apachehttptcphttp-headers

Why do we need both status code and phrase code in a http response message?


In the first header field of a http response message there is a status code (Eg.200,404,400) and phrase code(e.g.OK, NOT FOUND, Bad request). When we have a status code already, why do we need a phrase again? Wont that cause extra overhead?


Solution

  • A) Technically, that is not a header field. The first line simply is special.

    B) It's not needed and optional, and yes, it causes overhead.