Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

If-Modified-Since HTTP request header not respected #692

@sanmai-NL

Description

@sanmai-NL

When downloading an archive of a Git repo from GitHub using a default curl command line invocation with --time-cond, the HTTP server responds with HTTP/1.1 200 OK where it should have responded with HTTP/1.1 304 Not Modified.

Running this multiple times

curl -v --location --time-cond '/tmp/llvm-master.tar.gz' \
--output '/tmp/llvm-master.tar.gz' 'https://codeload.github.com/rust-lang/llvm/tar.gz/master' \
--output '/tmp/llvm-master.tar.gz' 'https://github.com/rust-lang/llvm/archive/master.tar.gz'

Causes the full archive to be retransferred time after time. This costs users as well as GitHub a lot of traffic.

Though not very relevant, the curl version used:

curl 7.49.1 (x86_64-pc-linux-gnu) libcurl/7.49.1 OpenSSL/1.0.2h zlib/1.2.8 libidn/1.32 libssh2/1.7.0
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets```

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions