title: HTTP Response Status-Line maximum size
body: <p>Quick question - is there a maximum size for the Status-Line of a HTTP Response?</p>
  
  <p>In the RFC I could not find this information, just something like this:</p>
  
  <blockquote>
    <p>Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF</p>
  </blockquote>
  
  <p>According to this i could assume:</p>
  
  <ul>
  <li>HTTP-Version is usually 8 Bytes ( e.g. <code>HTTP/1.1</code>  )</li>
  <li>Status-Code is 3 Bytes</li>
  <li>2 Spaces + CRLF is 4 Bytes</li>
  <li>Reason-Phrase -> The longest according to the RFC is <code>Requested range not satisfiable</code> so 31 Bytes</li>
  </ul>
  
  <p>This would be  a sum of 46 Bytes. </p>
  
  <p>Is this assumption correct or did I miss anything?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Due to the answer below, I just want to specify my problem a bit:</p>
  
  <p>I am parsing some kind of Log file with TCP messages from a server. Now there is some random Data I don't care for and some HTTP Messages which I want to read. Now all data I get I parse for a <code>\r\n</code> to find the Status Line. Since I need to make assumption that my header is split into several TCP packages I just buffer all data and parse it. </p>
  
  <p>If there is no maximum size for the header status-line, I need to buffer all data until the next <code>\r\n</code> occurs. In the worst case this means I save like kilobytes over kilobytes of random data, since it <em>could</em> ( but will most likely will not ) be part of the Header Status Line.</p>
  
  <p>Or would it , in this case, be rather appropriate to parse for the HTTP Version String instead of the CRLF ?</p>