curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: "--head" and "--request" Options Together

From: Daniel Stenberg via curl-users <>
Date: Tue, 9 Mar 2021 23:15:17 +0100 (CET)

On Tue, 9 Mar 2021, Thuc Nguyen via curl-users wrote:

> What's the expected behavior when both "--head" and "--request GET" options
> are provided?

Mostly sadness and confused users. I once wrote a blog post on this topic:

--head means that curl will send a HEAD and *not* wait for a response body,
because HEAD responses have no bodies.

When you add --request to the equation, curl will still *think* it makes a
HEAD but you change the actual method verb to "GET" and thus the server will
respood with a response body, but curl will not read it because it still knows
you're doing a HEAD.

> I'm able to reproduce with the latest version 7.75.0. I happen to have an
> older version, 7.29.0, and can't reproduce it there. So it seems that the
> behavior was changed in recent versions.

What behavior were you hoping for?

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2021-03-09