Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7567541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:41:23+00:00 2026-05-30T14:41:23+00:00

Quick question – is there a maximum size for the Status-Line of a HTTP

  • 0

Quick question – is there a maximum size for the Status-Line of a HTTP Response?

In the RFC I could not find this information, just something like this:

Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF

According to this i could assume:

  • HTTP-Version is usually 8 Bytes ( e.g. HTTP/1.1 )
  • Status-Code is 3 Bytes
  • 2 Spaces + CRLF is 4 Bytes
  • Reason-Phrase -> The longest according to the RFC is Requested range not satisfiable so 31 Bytes

This would be a sum of 46 Bytes.

Is this assumption correct or did I miss anything?

UPDATE:

Due to the answer below, I just want to specify my problem a bit:

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 \r\n 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.

If there is no maximum size for the header status-line, I need to buffer all data until the next \r\n occurs. In the worst case this means I save like kilobytes over kilobytes of random data, since it could ( but will most likely will not ) be part of the Header Status Line.

Or would it , in this case, be rather appropriate to parse for the HTTP Version String instead of the CRLF ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:41:25+00:00Added an answer on May 30, 2026 at 2:41 pm

    RFC 2616, 6.1.1:

    The reason phrases listed here are only recommendations — they MAY be
    replaced by local equivalents without affecting the protocol.

    Aside from this, the HTTP protocol is “allowed” to add more status codes (in a new RFC) without changing the HTTP version to 1.2, provided that the new codes don’t introduce additional requirements on HTTP clients. Clients are supposed to treat an unknown status code as if it were x00 (where x is the first digit of the code they get, indicating the category of response), except that they shouldn’t cache the response.

    So the only limit is the max length of an HTTP header line or of the response headers in total. As far as I can see, the RFC doesn’t define any limit, although specific servers impose their own.

    What you can be sure of is that the user-agent may ignore the Reason Phrase entirely. So if it’s big, you can read it in small pieces and throw them away one at a time until you reach CRLF. If you want to display a human-readable message, mostly you can use the recommended Reason Phrase for the status code that the server provides, regardless of what Reason Phrase the server sends.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick question. There is a legacy website (that is not under my control and
quick question. Is there any way to make this possible? int array [] =
Quick question that I can't seem to find anywhere; at least not a clear
Quick question, I was curious if there is any difference between a database table
Quick question about the TransactionScope object. Found this on the internet: When you access
Quick question: is this kind of nesting possible? An if statement first passing a
Quick question, having a look around it seems this is the case, but it
Quick question here about short-circuiting statements in C#. With an if statement like this:
Quick question, I found answers close to this but nothing that helps me. I
Quick Question. Eval in JavaScript is unsafe is it not? I have a JSON

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.