cURL / Mailing Lists / curl-users / Single Mail


date condition

From: Zvi Har'El <>
Date: Mon, 16 Dec 2002 13:22:25 +0200


I have tried to use the -z option to send HTTP if-modified-since requests.
Having downloaded a file using

curl -Ro aaa http://host/path

and now requesting

curl -i -z aaa http://host/path

works fine, returning HTTP/1.0 304 Not Modified
However, a request which should be completely analogous

curl -i -z "`date -r aaa`" http://host/path

doesn't issue an if-modified-since request and always returns the file. Since
the date expression generated by the date -r (or date --reference) command
is completely legal, I suspect there is a bug here.

Parenthetically, there is a problem also in the "works fine" case: if you don't
specify -i, you get nothing, not even an error return!!!



Dr. Zvi Har'El     Department of Mathematics
tel:+972-54-227607                   Technion - Israel Institute of Technology
fax:+972-4-8324654     Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
                              Monday, 11 Tevet 5763, 16 December 2002,  1:11PM
This email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
Received on 2002-12-16