You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@infra.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2015/11/14 13:36:11 UTC

[jira] [Created] (INFRA-10765) Conditional download of files from ASF Git repos

Sebb created INFRA-10765:
----------------------------

             Summary: Conditional download of files from ASF Git repos
                 Key: INFRA-10765
                 URL: https://issues.apache.org/jira/browse/INFRA-10765
             Project: Infrastructure
          Issue Type: Bug
          Components: Git
            Reporter: Sebb


It's possible to download individual files from Git, for example:

https://git-wip-us.apache.org/repos/asf?p=infrastructure-puppet.git;a=blob_plain;f=Puppetfile;hb=HEAD

This returns the file contents, however the headers give no indication of the date/version/hash of the file:

--- cut here ---
Date: Sat, 14 Nov 2015 12:17:51 GMT
Server: Apache/2.4.7 (Ubuntu)
Content-Disposition: inline; filename="Puppetfile"
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 1104
Keep-Alive: timeout=30, max=99
Connection: Keep-Alive
Content-Type: text/plain; charset=ISO-8859-1

200 OK
--- cut here ---

This means that it is not possible to make a conditional HTTP GET request for the file.
This may not matter for a short file, but for a large file it creates unnecessary traffic and takes longer than necessary.

The same file is available from GitHub:

https://raw.githubusercontent.com/apache/infrastructure-puppet/deployment/Puppetfile

This returns the following headers (most elided):

--- cut here ---
Etag: "c8ab7a99c6cef0ca6b2759b8b39301a6e85cb932"
Content-Type: text/plain; charset=utf-8
Content-Encoding: gzip
Content-Length: 1104
--- cut here ---

The Etag means that a conditional HTTP GET request can be used.

Is there any reason why the canonical ASF Git repos do not support Etag or Last-Modified headers?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)