News for hackers. Stuff that matters.
Re:We have broken HTTP by savanaly on Sunday January 11, 2015 @01:20PM (#8870675)
Web developer for less than a year here, so just offering my perspective on what "new web devs" know these days. I know there are status codes beyond 200 and 404, and work with maybe a dozen in regular rotation. I know there are probably hundreds more, but until they are in more regular use I think it would just inhibit clarity to use them (just like how using less precise language paradoxically makes your prose clearer sometimes). This is sort of a chicken and the egg problem, but the paradigm could definitely shift if the marginal usefulness is high enough.

URN's I had not heard of, but the article didn't make it clear to me what problem they would solve.

Of course I know about HTTP verbs PUT and DELETE and HEAD-- is there really any web dev who doesn't? And I am pretty rigorous about using the appropriate one (unlike with status codes).

I don't have an opinion on how apps are isolated from the web and don't have interlinks between them. Don't really use mobile apps myself except utility ones like Spotify and Netflix.

Re:We have broken HTTP by BillinghamJ on Sunday January 11, 2015 @01:32PM (#8870737)
You should put a bit of effort into making sure you use the most appropriate status code.

If a client isn't already aware of the code, it decides what to do based on the first number:

- 1xx - continue receiving content

- 2xx - finished receiving content

- 3xx - follow redirect

- 4xx - client error occurred, show error page

- 5xx - server error occurred, show error page

So there is no harm in using better (but less commonly known) codes

Re:We have broken HTTP by ilghiro on Monday January 12, 2015 @08:00AM (#8873629)
- 1xx - Don't Refresh Yet

- 2xx - You Don't Need Refresh

- 3xx - We're dealing with Refresh for you

- 4xx - Don't Bother Refreshing

- 5xx - Refresh, You Might Get Lucky

Re:We have broken HTTP by billpg on Sunday January 11, 2015 @03:37PM (#8871202)
5xx - try again later, if applicable.
Re:We have broken HTTP by wtbob on Sunday January 11, 2015 @03:12PM (#8871107)
> URN's I had not heard of, but the article didn't make it clear to me what problem they would solve.

It's a universal namespace, just like UUIDs, but with just enough extra sauce to make it theoretically possible to do interesting things with it. So 'urn:isbn:0451450523' might represent The Last Unicorn, and if you fed it to your Kindle it might enable you to buy it, and if you fed it into Nook ditto, and if you fed it into Project Gutenberg you might get a notice that it won't fall out of copyright until A.D. 3172, and if you fed it into your browser it might do any of those things or just look it up on ibiblio or Wikipedia.

Unfortunately, like many good ideas, it didn't take off because folks couldn't imagine a profitable use for it.

Re:We have broken HTTP by bjt on Sunday January 11, 2015 @05:05PM (#8871522)
Looks a lot like the resource names on AWS [1]

<!-- AWS Elastic Beanstalk application version --> arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment

<!-- IAM user name --> arn:aws:iam::123456789012:user/David

<!-- Amazon RDS tag --> arn:aws:rds:eu-west-1:001234567890:db:mysql-db

<!-- Amazon S3 bucket (and all objects in it)--> arn:aws:s3:::my_corporate_bucket/*

http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-na...

Re:We have broken HTTP by eropple on Sunday January 11, 2015 @05:48PM (#8871644)
It should. There's a reason for that. :)
Re:We have broken HTTP by danellis on Sunday January 11, 2015 @11:45PM (#8872547)
What's the reason, and why didn't they just use URNs?
Re:We have broken HTTP by eropple on Monday January 12, 2015 @02:49PM (#8875982)
The reason is because they're based off the same principle. "ARN" stands for "Amazon Resource Name".

I don't know why they didn't use URNs. Probably because nobody else does.

Re:We have broken HTTP by pluma on Monday January 12, 2015 @08:17AM (#8873705)
I think the implication is meant to be "they look like URNs because they are".
Re:We have broken HTTP by wtbob on Monday January 12, 2015 @09:31AM (#8874012)
Except that they're not; rather, they're ARNs. URNs must begun with 'urn:'. It doesn't make a lot of sense that they're not URNs, but…they're not.
Re:We have broken HTTP by eropple on Monday January 12, 2015 @02:50PM (#8875990)
My guess: "nobody uses URNs generally, so might as well save four bytes off every one?"
Re:We have broken HTTP by rgbrenner on Sunday January 11, 2015 @02:06PM (#8870868)
> I know there are probably hundreds more

Actually there aren't. There are like 60. It really shouldn't take too long to read over them: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Re:We have broken HTTP by eropple on Sunday January 11, 2015 @01:28PM (#8870707)
> URN's I had not heard of, but the article didn't make it clear to me what problem they would solve.

The idea of a globally unique, permanent identifier that would resolve to a URL to indicate the current location of a resource is fairly commonplace, isn't it? We've tried to bolt all sorts of equivalents onto the existing URL infrastructure without them.

Re:We have broken HTTP by regularfry on Sunday January 11, 2015 @01:28PM (#8870712)
Do you know where to find the canonical list of HTTP status codes? If the answer's "yes", you're probably OK.
Re:We have broken HTTP by spb on Sunday January 11, 2015 @07:55PM (#8871992)
Yes... Wikipedia.
Re:We have broken HTTP by pluma on Monday January 12, 2015 @08:25AM (#8873734)
To the downvoters: sure, Wikipedia is not the canonical source (that would be IANA's list[0]). But Wikipedia mostly gets it right and also lists some of the "non-standard but can be encountered in the wild" ones.

I actually prefer the Wikipedia page[1] exactly because it includes more than just the canonical subset. For example, 451 is not yet official, but pretty much as close as you can get to a standard without having an actual standard (well, there's a draft).

[0]: http://www.iana.org/assignments/http-status-codes/http-statu... [1]: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Re:We have broken HTTP by simpleigh on Sunday January 11, 2015 @03:09PM (#8871096)
> Of course I know about HTTP verbs PUT and DELETE and HEAD-- is there really any web dev who doesn't?

Yes: I've interviewed some. Very few realise there's any more than GET/PUT/POST/DELETE, which astonished me: surely everyone's left an HTTP debugger running while updating an SVN repo or browsing a WebDAV share?