cURL / Mailing Lists / curl-library / Single Mail


Re: cURL behavior on 303 does not seem to be what is documented/advertised?

From: Daniel Stenberg <>
Date: Thu, 17 Jan 2013 23:27:39 +0100 (CET)

On Wed, 16 Jan 2013, Yves Arrouye wrote:

> > You hardly ever truly want to use -X.
> Ok. There are thousands of examples showing that (see resty etc.).

But if you look again, you'll see that basically none of them are from anyone
in the curl project or are hosted on the curl site. A bad idea repeated many
times remains a bad idea!

> If I drop the -X POST, how does curl know to POST? Because I pass a data
> argument to it?

Yes, that's how you ask for a POST.

> What about PUT?

That's what -T makes.

> Is HEAD assumed when -I is passed?


All this is documented by the way, this is not some sort of hidden truth!

> I am implementing the HTTP MAC I-D which requires that the host name is
> obtained from the host header (I used to get it from the connection's URL).
> I've fixed the code to move setting it before I need.

You should instead get the host name from the struct member that is (later)
used to create the host header.

List admin:
Received on 2013-01-17