[01:46:46] Wombert (~Wombert@dslb-088-065-201-187.pools.arcor-ip.net) joined #rest. [01:54:44] mephju (~mephju@dslb-094-222-017-009.pools.arcor-ip.net) joined #rest. [01:55:15] kennethreitz (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) left irc: Quit: Textual IRC Client: http://www.textualapp.com/ [02:55:01] grove (~grove@aggw006.cappelendamm.no) left irc: Quit: grove [02:58:16] grove (~grove@aggw006.cappelendamm.no) joined #rest. [04:06:20] grove_ (~grove@aggw006.cappelendamm.no) joined #rest. [04:06:40] grove (~grove@aggw006.cappelendamm.no) left irc: Ping timeout: 255 seconds [04:06:40] Nick change: grove_ -> grove [05:08:26] grove (~grove@aggw006.cappelendamm.no) left irc: Quit: grove [05:09:23] grove (~grove@aggw008.cappelendamm.no) joined #rest. [05:10:52] grove_ (~grove@aggw006.cappelendamm.no) joined #rest. [05:13:59] grove (~grove@aggw008.cappelendamm.no) left irc: Ping timeout: 268 seconds [05:13:59] Nick change: grove_ -> grove [05:43:56] grove_ (~grove@aggw006.cappelendamm.no) joined #rest. [05:47:05] grove (~grove@aggw006.cappelendamm.no) left irc: Ping timeout: 252 seconds [05:47:05] Nick change: grove_ -> grove [06:09:27] dr1fter (4c187c2c@gateway/web/freenode/ip.76.24.124.44) joined #rest. [06:11:47] is there an appropriate HTTP status code for the situation where i want to tell a polling ajax app that the resource it's waiting for isn't ready yet, but it should keep polling? [06:12:14] possibly just 404? [06:14:31] you could possibly use Retry-After: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.37 [06:14:40] Accepted [06:14:53] 202 or whatveer [06:15:13] yeah 202 [06:17:02] trygvis: with 304 perhaps? [06:17:52] wait [06:18:14] if the client is doing the creation you should responsd with a 202 [06:18:33] it's not. the client is waiting for a server-side event, and polling for its completion [06:19:14] The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this. [06:19:19] The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed. The entity returned with this response SHOULD include an indication of the request's current status and either a pointer to a status monitor or some estimate of w [06:20:00] once you've responded with a 202 I guess you can either respond with a 202 or a 204 [06:20:07] on subsequent Gets [06:20:48] tbh - you're better off just reading the http spec and picking the response code that best fits your context [06:21:08] but in general when you create something and the client is waiting for it to be comepletely you should initially respond with a 202 [06:21:22] s/completely/completed [06:28:36] dr1fter: if there's no initial interaction then maybe just return a 204 ? [06:30:40] the benefit of using 202 is that you can include content to describe the actually processing status in the future [06:30:47] well, i have the client initiating a request, polling for a response, and eventually getting one that sends to another url. so now i'm thinking, maybe 202 when the request is initiated, with location pointing to a polling url -- and then that polling url can return 204 until the resource is ready [06:31:00] right [06:31:05] since 204 isn't a failure condition if the url is meant specifically for polling, instead of as a placeholder for the result [06:31:57] only thing worth bearing in mind is that point about 202 allowing you to include content in the response [06:32:02] Nick change: mamund_ -> mamund [06:32:11] Action: mamund re-appears [06:32:43] you may want to do that in the future - HTTP's only supposed to provide general semantics, if you have any application specific stuff (maybe communicating differing processing statuses) then you'll have to do that in the body [06:33:02] so if you pick 204 or 304 you just made your life difficult [06:33:06] potentially [06:33:11] the result of this asynchronous request is just a url pointing to a new resource, so i'm still not totally sure what status code is appropriate when the polling completes. [06:33:25] i'm thinking about 201 but it's probably not appropriate [06:33:38] do you need to use differnet URIs ? [06:34:16] since the resource is actually created in response to two incoming requests (clients are being matched for chat, and the result is a URL that you and some other client have been matched into) [06:34:47] oh ok [06:34:51] 301 ? [06:35:05] 302 rather [06:35:07] :) [06:36:05] hah. 302 sounds appropriate. [06:37:34] yeah so.. say your users asked you for some feedback in the GUI that tells them once someone had been found, when the 'room' is being created, etc.. [06:37:46] if you pick 204 or 304 you will find it hard to do that [06:38:01] and in some ways if the resource itself is a 'status' resource [06:38:09] there is nothing wrong with returning 200 [06:38:52] it'll make sense to the client because they'll be directed there in the first place by 202 and a Location header [06:39:11] so the client will know what's going on in your app [06:39:34] yeah, that's true [06:39:59] DracoBlue (~Adium@p4FCDF5D3.dip.t-dialin.net) joined #rest. [06:40:22] DracoBlue (~Adium@p4FCDF5D3.dip.t-dialin.net) left #rest. [06:40:26] i mean, it seems like the right thing to do would be to return 204 when im sending nothing, and 200 when im sending something, and otherwise interpret them pretty much the same [06:42:04] but that's more like capital-r Right thing to do -- less work and probably still fine to just use 200 exclusively [06:43:49] right, if there's nothing to say then you should technically 204 [06:44:39] but i guess your point is that my client shouldn't rely on it being 204 instead of 200 [06:44:53] I don't think it's the end of the world if you don't though - and will avoid potentially breaking stuff in the future [06:45:25] yeah that's pretty blasphemous but it's probably true in practice [06:45:39] which? [06:45:51] to use a 200 for a basically empty response [06:45:57] oh, sure [06:45:59] and say that's an "ok" thing to do [06:46:03] lol [06:46:23] it is, but don't tell anyone I told you. [06:46:37] specially mamund, he's very religious and irrational about these things. [06:46:43] :) [06:50:04] fu-manchu (~fumanchu@adsl-99-30-180-185.dsl.sfldmi.sbcglobal.net) joined #rest. [06:52:10] bigbluehat (~bigblueha@adsl-98-71-133-72.gsp.bellsouth.net) joined #rest. [07:18:39] Nick change: dr1fter -> jtrask [07:19:10] jtrask (4c187c2c@gateway/web/freenode/ip.76.24.124.44) left #rest. [07:19:12] grove (~grove@aggw006.cappelendamm.no) left irc: Quit: grove [07:37:37] bigbluehat (~bigblueha@adsl-98-71-133-72.gsp.bellsouth.net) left irc: Quit: Leaving. [08:13:05] Action: mamund was away and just realized he was slapped upside his noggin by mikekelly [08:16:08] just calling it how it is. [08:16:09] mr_yall (~mryall@217.158.24.93) joined #rest. [08:16:12] :D [08:16:15] ROFL [08:20:20] mephju (~mephju@dslb-094-222-017-009.pools.arcor-ip.net) left irc: Quit: Ex-Chat [08:42:37] kennethreitz (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) joined #rest. [08:48:55] mr_yall (~mryall@217.158.24.93) left irc: Remote host closed the connection [08:51:07] ^oo^ [09:16:06] mattis (~mattis@62.73.197.123) joined #rest. [09:33:33] DracoBlue (~Adium@dslb-088-075-066-254.pools.arcor-ip.net) joined #rest. [09:33:37] DracoBlue (~Adium@dslb-088-075-066-254.pools.arcor-ip.net) left #rest. [09:55:06] saml (~sam@adfb12c6.cst.lightpath.net) joined #rest. [09:55:44] i have /slideshow/foo/1 (first slide of slideshow foo) that uses /img/hello.jpg . if there is DELETE /img/hello.jpg, what will happen to /slideshow/foo/1 ? [09:56:17] Wombert (~Wombert@dslb-088-065-201-187.pools.arcor-ip.net) left irc: Quit: Wombert [09:57:07] that's up to your application to decide [10:09:00] Action: mamund is back [10:20:51] KevBurnsJr (~KevBurnsJ@50.0.103.39) joined #rest. [10:22:20] nuclearsandwich (~nuclearsa@173.247.193.198) joined #rest. [11:24:27] darrelmiller (~darrelmil@bas1-montreal08-1279564619.dsl.bell.ca) joined #rest. [11:25:19] twilliams (~twilliams@apache/committer/twilliams) left irc: Remote host closed the connection [11:58:09] Wombert (~Wombert@dslb-088-065-201-187.pools.arcor-ip.net) joined #rest. [13:11:03] hobodave (~hobodave@pdpc/supporter/professional/hobodave) joined #rest. [13:45:09] bigbluehat (~bigblueha@adsl-98-71-133-72.gsp.bellsouth.net) joined #rest. [13:56:57] Action: mamund is outta hear [13:57:25] good night [14:18:33] saml (~sam@adfb12c6.cst.lightpath.net) left irc: Quit: Leaving [14:19:26] Wombert (~Wombert@dslb-088-065-201-187.pools.arcor-ip.net) left irc: Quit: Wombert [14:46:08] bigbluehat (~bigblueha@adsl-98-71-133-72.gsp.bellsouth.net) left irc: Quit: Leaving. [17:24:13] Wombert (~Wombert@dslb-088-065-201-187.pools.arcor-ip.net) joined #rest. [18:05:49] kennethreitz (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) left irc: Ping timeout: 244 seconds [18:24:38] nuclearsandwich (~nuclearsa@173.247.193.198) left irc: Ping timeout: 252 seconds [20:38:11] KevBurnsJr (~KevBurnsJ@50.0.103.39) left irc: [21:30:33] nuclearsandwich (~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net) joined #rest. [21:43:55] Wombert (~Wombert@dslb-088-065-201-187.pools.arcor-ip.net) left irc: Quit: Wombert [22:01:28] nuclearsandwich (~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net) left irc: Remote host closed the connection [22:31:01] kennethr_ (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) joined #rest. [22:31:03] kennethreitz (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) joined #rest. [23:06:31] kennethr_ (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) left irc: Quit: Computer has gone to sleep. [23:06:32] kennethreitz (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) left irc: Quit: Computer has gone to sleep. [23:30:11] kennethr_ (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) joined #rest. [23:30:11] kennethreitz (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) joined #rest. [23:30:44] kennethr_ (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) left irc: Client Quit [23:30:44] kennethreitz (~kennethre@c-24-127-96-129.hsd1.va.comcast.net) left irc: Client Quit [23:40:52] nuclearsandwich (~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net) joined #rest. [23:41:17] nuclearsandwich (~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net) left irc: Read error: Connection reset by peer [23:41:21] nuclears_ (~nuclearsa@74-93-3-241-SFBA.hfc.comcastbusiness.net) joined #rest. [00:00:00] --- Thu Dec 22 2011