-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hrvoje Niksic wrote: > Micah Cowan <[email protected]> writes: > >>> I am told that interactive clients issue GET requests with request >>> bodies when doing AJAX. If that is indeed the case, supporting it in >>> Wget might be genuinely useful. >> Really? I'll be mildly shocked if that's the case, since that makes some >> silly assumptions about the server's (and client's!) capabilities, and >> is somewhat outside the bounds of what's specified for HTTP. > > Looking at the HTTP/1.1 RFC, I don't see that GET requests are > required to have empty bodies.
Neither do I. However, the semantics for request bodies in GET are not defined (which IMO means it's a bad idea to write a client that sends them), and the spec does say that receiving servers "SHOULD" ignore them. Somewhat amusingly, RFC 2616 states in section 4.3: A message-body MUST NOT be included in a request if the specification of the request method (section 5.1.1) does not allow sending an entity-body in requests. But I can not find a single instance of _any_ request method defined in RFC 2616 that explicitly disallows sending an entity-body. While searching I came across a message on the http-wg mailing lists that noted the same thing. The current draft appears to still be suffering from the same problem. I suspect that GET was intended to be such a method, but at any rate the specification does not actually forbid it. >> But of course, you're right: if this is something that is being used >> for Ajax, especially if it's widespread, then it's something to >> consider for Wget. If anyone can find evidence of this practice >> being/becoming mainstream (or approaching it, etc), please post it >> here. > > I'll try to find a specific reference. I believe it had to do with > sending SOAP requests, as mentioned here: > > http://www.ibm.com/developerworks/xml/library/x-tipgetr.html That page looks to me like it's discussing a change that was made to the SOAP specification to allow SOAP requests to be sent via HTTP GET requests. However, the change in question only allows GET to be used for the "SOAP Response Message Exchange Pattern", which specifically precludes sending a SOAP envelope as part of the request. It doesn't sound to me like the SOAP spec was written with the use of GET request-bodies in mind. http://www.w3.org/TR/2007/REC-soap12-part2-20070427/#http-suptfeatures http://www.w3.org/TR/2007/REC-soap12-part2-20070427/#soapresmep Also, I'm not caught up on the latest in JavaScript, but I don't think the usual APIs allow one to send request-bodies for GET. If I'm right about that, then it wouldn't be possible to write a portable AJAX framework that does so. - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer. Maintainer of GNU Wget and GNU Teseq http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpKllYACgkQ7M8hyUobTrH+IgCffjTRYJyKE518K0WAU8XV3pjx T2QAn2J82MyB92+6jk5gMmGym9WP30lL =YF49 -----END PGP SIGNATURE-----
