[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: more politics


bad side effects of coke
Mike Champion wrote:
> On Thu, 31 Jul 2003 11:23:15 -0400, John Cowan 
> <jcowan@r...> wrote:
> 
>> Norman Walsh scripsit:
>>
>>> What if the GET drops a can of coke on your desk?
>>
>>
>> Short of matter replication (Star Trek or Drexler varieties), it can't do
>> that.  If the can is brought from somewhere else, that's a side effect,
>> and GETs have to be idempotent and therefore side-effect-free.

Idempotent and side-effect free are two different things. HTTP PUT and 
DELETE are both idempotent, but definitely have side effects.

> Whoop! Whoop! Permathread warning ...
> 
> Uhh, GET's are *supposed* to be side-effect free, but that's not 
> enforced by anything I'm aware of in a typical HTTP implementation.  I'm 
> not at all sure that's true on the wild wild web, very definitely not in 
> the case of pay-by-the-kilobyte wireless plans that have (well, "had" 
> since I have an unlimited plan now) the side-effect of running up my 
> cellphone bill every time I do a GET.  Likewise, A little View Source 
> expedition on Amazon.com shows a lot of "method=get" forms that seem to 
> have what I would call side effects.  (Fortunately, One-click ordering 
> is not implemented with GET, but it *could* from a mechanical point of 
> view, no?).

Note that the spec doesn't say that "GETs must be side effect free". 
Instead, it says that GET and HEAD should be safe (see RFC 2616, section 
9.1.1 [1]). In particular the last paragraph of that section says:

"Naturally, it is not possible to ensure that the server does not 
generate side-effects as a result of performing a GET request; in fact, 
some dynamic resources consider that a feature. The important 
distinction here is that the user did not request the side-effects, so 
therefore cannot be held accountable for them."

The last sentence explains why it would be a bad idea for Amazon to 
implement one-click ordering with GET (either method=GET forms or <A> 
tags). Users (or software agents like spiders) shouldn't incur 
obligations by clicking links or typing URIs into the browser.

ISP bandwidth fees seem like a different issue to me, both because they 
are at a different protocol layer, and because they involve a third 
party. Sam Ruby and Mark Baker discussed the issue of whether the Google 
API's limit on number of queries per day meant that it should be using 
POST rather than GET. See [2] and [3].

> So, I assert that there is no real-world software reason why clicking on 
> a link could not result in a can of Coke being delivered to one's desk, 
> although that would clearly be a Bad Thing in terms of the Webarch and 
> the HTTP spec.  Am I mistaken?

I guess it's alright for GET to deliver a Coke, as long as it doesn't 
charge my account for it. And if the Googlebot spiders the Coke 
machine's URL, it's under no obligation to pay for any Cokes dispensed.

Jim

[1] - http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.1
[2] - http://www.intertwingly.net/blog/784.html
[3] - 
http://markbaker.blogspot.com/2002_09_01_markbaker_archive.html#81091743


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.