greptilian logo

IRC log for #rest, 2018-06-26

#rest on freenode has been logged here from May 2014 until end of July 2018 but logging has been suspended because the channel has been riddled with spam since August 2018 with no end in site. See the following blog posts about the problem:

Until the spam problem has been dealt with and logging can resume, please visit our wiki at https://trygvis.io/rest-wiki/

Thanks.

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
05:50 wsieroci joined #rest
06:44 Haudegen joined #rest
10:38 Haudegen joined #rest
12:55 wsiqueir joined #rest
14:40 saml joined #rest
14:40 saml in http, if client got 3xx, and it follows the Location, does client add Referer header or something?
14:40 * saml reads manual
17:01 whartung “it should”, but it’s not required, necessarily
17:01 whartung but some apps distinguish things that are refered and that aren’t
19:15 wsieroci joined #rest
19:57 saml joined #rest
20:05 saml_ joined #rest
20:05 saml_ what should be Content-Type  of 301 response?
20:52 whartung text/plain
21:11 saml_ hrm interesting.
21:11 saml_ nginx has setting to populate Content-Type based on file extension. So, for GET /a.jpg ,  and if I redirect that,  Content-Type: image/jpeg
21:14 ModusPwnens joined #rest
21:14 ModusPwnens I have a service that masters data. It should never, ever lose data and there's no way that other entities can delete data. In this case, if data is not found for a request, does it make more sense to return a 404 or a 500?
21:15 ModusPwnens From a certain lens, there was a service failure at some point if that data could not be found.
21:21 whartung well, sure saml_ — arguably the mime type is moot, since there’s “no content”.
21:22 whartung but how can you distinguish between a error on the server, and a bad request?
21:22 whartung get /service/alsdkjfa;lsdkja;lsd​kjga;lskjg;ldkfjgsldkfjgsdf
21:22 whartung taht should be a 500? or a 404?
21:22 saml_ hrm i see
21:23 saml_ i think it should be 404
21:23 whartung the client if if gets a 404, could then report something being wrong. But the server won’t know any different
21:24 saml_ if resource isn't found, 404
21:24 whartung plus, the 5xx class is “the server hated this transaction and spit up blood” vs “at some point in the past, an operator fat fingered a command and deleted data accidently”
21:24 saml_ if resource should never be not found... i 'd go back to drawing board
21:26 ModusPwnens why? What's wrong with having a service that should never lose its resources?
21:26 ModusPwnens but i think i generally agree with using 404 vs 500
21:27 ModusPwnens Additionally, if the data wasn't found, then it's not a problem with the CURRENT request, but rather it suggests that a problem occurred elsewhere. So from that perspective, a 500 also may not be appropriate
21:40 whartung correct
21:41 whartung I mean, you can certainly assert that if you can’t find something “it’s the servers problem”, but that does suggest a very well behaved client never lying to the server.
21:41 whartung (all clients lie…)

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

#rest on freenode has been logged here from May 2014 until end of July 2018 but logging has been suspended because the channel has been riddled with spam since August 2018 with no end in site. See the following blog posts about the problem:

Until the spam problem has been dealt with and logging can resume, please visit our wiki at https://trygvis.io/rest-wiki/

Thanks.