Google Web Accelerator and PHP
You've probably heard about the new Google Web Accelerator, but if you're like me, you haven't bothered to try it out or give it much thought. After all, it can't possibly be worth running Windows. If you develop PHP applications, however, you might want to pay attention.
There is a particular section of the HTTP specification that is frequently violated. Section 9.1.1 of RFC 2616 states the following:
In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is made aware of the fact that a possibly unsafe action is being requested.
What does this mean? If you use $_REQUEST, rely on register_globals, or deliberately use $_GET to process a request that performs some action (other than retrieval), then you're violating the HTTP specification, because a GET request can potentially perform that action. If your page contains links that perform an action (when followed), then the Google Web Accelerator is going to cause you problems. You can already find complaints about this. Of course, the developers complaining are the ones to blame, not Google.
The moral of the story is to adhere to the HTTP specification. If you want to play the web game, you have to play by the rules.





18 Comments
1.
AMiGo said:
2.
Ren said:
3.
Ben Ramsey said:
4.
Joshua Eichorn said:
5.
Padraic Brady said:
6.
Ilia Alshanetsky said:
7.
Chris Shiflett said:
8.
Ren said:
9.
C Drozdowski said:
10.
Ilia Alshanetsky said:
11.
Chris Shiflett said:
12.
Al said:
13.
Chris Shiflett said:
14.
Padraic Brady said:
15.
Ren said:
16.
Christopher Baus said:
17.
Ilia Alshanetsky said:
18.
Kevin D. Kinsey said: