Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why status code is not buffered?  RSS feed

Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beginner question:

Originally posted in
[url = ] Professional SCWCD Sample Chapter, p.88-89
"The first line of the server response contains the status code (200 in this case), followed by any headers, finally the border of the response.
Therefore, if the response has already been committed (or flushed) it is too late to change the status: it will have already been sent before the response body has just been committed.
HTTP headers do not cause a problem as they are buffered by the servlet and returned all at once. Therefore, the status may be set after a header has been set.

I would like to ask in this connection:
What are potential problems sending the wrong or null status code?
Why status code is not buffered?
Suppose, that HTTP headers are not buffered and what problem would it create?
Does it mean that status is always sent with headers and border, while headers are constantly monitored and may be sent separately on change?
[ December 17, 2002: Message edited by: G Vanin ]
Seriously? That's what you're going with? I prefer this tiny ad:
Rocket Oven Kickstarter - from the trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!