cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: ANNOUNCE: curl and libcurl 7.8.1

From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Thu, 23 Aug 2001 16:12:41 -0400

-----Original Message-----
From: Daniel Stenberg [mailto:daniel_at_haxx.se]

This release includes the following fixes:

 o added the -G option that converts -d posts to use GET requests
----------------------------------------------------------------------

Issue one:

I tested out the -G option (appreciate the quick implementation). It
appears it works fine if I actually allow it to do a "GET", but if I try
to get back the headers only (a "HEAD" request, or -I) I get this
output:

> curl -v -I "http://testweb/test.asp" -d 1=2 -G
  You can only select one HTTP request!

If I change -I to -i, it works fine.

I know a "HEAD" isn't a "GET", but both follow the idea that all form
fields, if any, should go into the URL. So I think this SHOULD work, and
therefore that this is probably a bug. I have NOT read the RFC lately
though, so it may be technically incorrect; however if that's the case,
then at least the error message could be a little better.

Issue two: if I do this:

> curl -v -i "http://testweb/test.asp?a=b" -d 1=2 -G -o t.txt
  * Connected to testweb (xx.x.xx.xxx)
> GET /test.asp?a=b?1=2 HTTP/1.1

the actual URL submitted won't be properly parsed by most web servers.
(Two question marks instead one ? and one &).

I tried a test with Internet Explorer 5.5 sp1, and its behavior actually
appears to be that the "?a=b" that's in the Form-Action gets discarded
when you submit a form using METHOD=GET to a URL containing a Question
Mark, and gets replaced with the contents of the form.

However, I'm wondering if it would be possible to add a check in the URL
specified to see if it already contains a question mark, and if so,
simply tack on the additional GET data with ampersands "&" instead of a
question mark "?".

--Kevin
Received on 2001-08-23