

New HTTP status codes - vgnet
http://www.rooftopsolutions.nl/blog/new-http-status-codes

======
zarvox
Code 511 sounds really useful. If captive portals actually implemented this,
it would help efforts like Convergence[1] to handle captive portals
gracefully, rather than having to play a heuristic guessing game.

It'll be interesting to see if browser vendors and captive portal vendors both
implement this, and what level of adoption they both reach.

[1] - <http://convergence.io/>

~~~
justincormack
Not sure I expect them to implement it in the near term alas.

------
richardlblair
I'll be honest, when I read the title on HN I thought for sure this post was
going to make me rage.

When I finally reached the content on google's webcache I was pleasantly
surprised. All these new status codes are not only useful, but they address
issues that exists today.

------
ggchappell
I don't understand the rationale behind the new codes.

In particular, look at the first one: 428 Precondition Required. This is
essentially the server saying to the client, "You don't know how to make
requests to me." What is the client supposed to do about it? Make requests
that can result in the desired responses, of course, or stop making requests.
But that's true of any 4xx response code. So what functionality does the new
428 code add? None that I can see.

If you click through to the RFC itself, the section on 428 says:

    
    
      Responses using this status code SHOULD explain how to resubmit the
      request successfully.
    

It then gives an example of an HTML body representing a human-readable message
that explains that "If-Match" should be used. Fine, that's good. I approve.
But every HTTP response comes with a body; we can already do this just fine
without having code 428.

So, again, what actual functionality does the 428 response code get us? It
results in a bit of new code being added to every web client, making them all
just a teensy bit more complicated. But to what end?

~~~
nickm12
> What is the client supposed to do about it?

Um...send a proper request? This seems like a perfectly fine code to me.
Suppose you have an HTTP request that takes two parameters and the client only
sends one of them. Which of the other existing 4xx codes would be appropriate
for that situation? "400 Bad Request" is probably what you'd use currently,
but as defined it indicates a syntactic error with the request rather than a
semantic one.

~~~
asdfaoeu
Presumably the client either does or does not know how to send a proper
request so if it is receiving the error message it might as well behave the
same way as any other 4xx code.

~~~
justincormack
Yes but presumably the message will point to the API documentation page that
explains this. It is a case of lost updates or this error.

~~~
ggchappell
Indeed. But, again, we could already do that without the 428 code. And so the
situation is: response code 428 tells the client nothing beyond the info
gotten from any 4xx response code. The response _body_ tells a human
something. The addition of the new response code helps neither one.

------
alpb
You can see a very well compiled cheatsheet here:
<http://www.restapitutorial.com/httpstatuscodes.html>

~~~
citricsquid
<http://httpstatus.es>

I'm bias as this is my site, but I prefer it because you can link to each code
and it doesn't rely on javascript affects to display the data, also a
memorable URL :-)

------
zbowling
Ironically I'm not getting any HTTP code from this link... because the site is
timing out.

~~~
vgnet
Here you go:
[http://webcache.googleusercontent.com/search?q=cache:39agAaD...](http://webcache.googleusercontent.com/search?q=cache:39agAaDJm2oJ:www.rooftopsolutions.nl/blog/new-
http-status-codes+&cd=1&hl=en&ct=clnk)

