cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: time condition -z with head -I option?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 23 Mar 2007 09:29:59 +0100 (CET)

On Fri, 23 Mar 2007, Morgan Read wrote:

>> Uh, what do you expect -z to do when all you ask for is --head ?

> Mmmm, after playing around a bit I realise that -z probably relies on the
> header for time so it'll be downloaded anyway, but if -z didn't match then
> I'd hope for a suppression of the header output, as if --head wasn't there.
> As it is, there's no distinction between a match and mismatch.

Correct, for HEAD there is no distinction and there is no way there can be any
due to how this is defined to work in the RFC2616. It might not be clear in
the man page, but for HTTP the -z simply adds a conditional to the HTTP
request and that makes the conditional get checked by the server. It will
still always respond with a HTTP header, as long as the HTTP server works.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-03-23