POST vs GET

Nathan Potter ndp at opendap.org
Fri Dec 22 21:27:13 PST 2006


On Dec 22, 2006, at 8:12 PM, John Caron wrote:

> Im pretty sure (alhtough i dont see it at the moment in the HTTP  
> specs) that GET requests arent expected to carry anything in the  
> body of the message, only headers are expected. So you never get a  
> Reader on a GET. The idea is that the GET request is cacheable,  
> based only on the URL.
>

Right - I was trying to see if by some chance Tomcat would allow/ 
detect/make available body content in a GET request. My experiment  
indicates that it does not, as you point out. I just had to try it,  
since apparently there are CGI based servers that abuse GET in that  
manner.

> The POST/application/x-www-form-urlencoded thing i think evolved  
> after the fact to deal with the practical case of needing long  
> parameters in the URL. It is a common use of POST, and is  
> considered equivilent to a GET. In servlets, POST is automatically  
> sent to doGet() for that reason, and theres no reason to look at  
> the Reeader since the servlet container has already parsed it.

Unless of course someone has implemented doPost() and they don't do  
that...

>
> Take all this with a grain of salt, since my knowledge of HTTP is  
> spotty, and it seems that there are lots of subtleties.
>
> I guess the point is that while dedicated client/servers can do any  
> nonstandard thing they want, the whole point of opendap is to  
> specify standard ways to do things so that 3rd party clients and  
> servers can interoperate.


So - while we have a nascent SOAP interface that uses (all of) POST  
at the moment it is clear that there needs to be a thoughtful  
discussion/plan about how DAP4 servers should behave when responding  
to the HTTP POST method. SOAP will be part of the behavior, but there  
may/will be more.

So - is the use "POST/application/x-www-form-urlencoded thing" to  
"extend" a URL a standard or a common practice?


I agree with John's point above - dedicated client/server can do  
anything they need to do, but the point of OPeNDAP is to specify  
standard ways to do things so that 3rd party clients and servers can  
interoperate.


N




=======================================================
Nathan Potter                        The OPeNDAP Project
ndp at opendap.org                       http://opendap.org
541.752.1852 voice


The OPeNDAP Developer's Meeting will be held on
21-23 Feb 2007 in Boulder CO.

See the  Developer's Wiki:
"http://wiki.opendap.org/twiki/bin/view/Developers/DevMeeting2007"
for more details.

=======================================================





More information about the Opendap-tech mailing list