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.

--time-cond puzzle

From: Paul Gilmartin via curl-users <>
Date: Sun, 17 Jan 2021 16:49:46 -0700

With curl:
    1293 $ uname -sr; curl --version | head -1
    Darwin 18.7.0
    curl 7.74.0 (x86_64-apple-darwin18.7.0) libcurl/7.74.0 (SecureTransport) OpenSSL/1.1.1i zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.0 libssh2/1.9.0 nghttp2/1.42.0 librtmp/2.3

And a purposely backdated reference file:
    -rw-r--r-- 1 paulgilm wheel 5340 Oct 31 1984 ./wlvtype?CMSPIP-L.12966
I try:
    ifcurl 19+ curl --location --fail --show-error --time-cond './wlvtype?CMSPIP-L.12966' --header 'From:' --dump-header './wlvtype?CMSPIP-L.12966.headers' --output './wlvtype?CMSPIP-L.12966' ''

The file is not refetched:
    1295 $ ls -l wlv*6
    -rw-r--r-- 1 paulgilm wheel 5340 Oct 31 1984 wlvtype?CMSPIP-L.12966
But the headers show a recent modification:
    1296 $ grep Last /dev/null *ers
    wlvtype?CMSPIP-L.12966.headers:Last-Modified: Sun, 17 Jan 2021 18:30:31 -05.00.00

Is that Last-Modified valid syntactically?

Received on 2021-01-18