Skip to content
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

Open
sanmai-NL opened this issue Jun 17, 2016 · 2 comments
Open

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

sanmai-NL opened this issue Jun 17, 2016 · 2 comments

Comments

@sanmai-NL
Copy link

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```
@cirosantilli
Copy link
Collaborator

Is that the case for all pages or just archives? Of course, archives are the most serious case.

@sanmai-NL
Copy link
Author

It happens with all content. You can check by inspecting the response when running the following a second time:

curl -v --location --time-cond '/tmp/issue-692' \
    --output '/tmp/issue-692' 'https://github.com/isaacs/github/issues/692'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants