1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #640 resolved

Put "tar" in the filename for gz and bz2 downloads (BB-689)

Dave Dribin
created an issue

When downloading a source archive of a tag using gz or bz2, the resulting filename is <project>-<tag>.{gz,bz2}, for example "foo-1.0.bz2". However, they are not just gz or bz2 archives, they are tar files that are compressed. Thus, that should be expressed in the extension, for example "foo-1.0.tar.bz2" and "foo-1.0.tar.gz". Or, at the very least, use .tbz2 or .tgz extensions, such as "foo-1.0.tbz2".

Comments (10)

  1. Benoit Jacob

    All I can get to work is http://bitbucket.org/user/project/get/tag.tar.bz2 The original reporter seems to say (iiuc) that this is possible: http://bitbucket.org/user/project/get/project-tag.tar.bz2 but this doesn't seem to work for me.

    I have a side request: could you also enable: http://bitbucket.org/user/project/get/user-tag.tar.bz2

    The rationale is that in my case, user=eigen and project=eigen2 and tag=2.0.2. So 'project-tag' is ugly in my case: 'eigen2-2.0.2'. What I really want is 'eigen-2.0.2' which is 'user-tag'. This should be unambiguous as you already put the project name as part of the URL.

  2. Brodie Rao

    The source download links should include tar in the name now. Existing links to revision.bz2/gz should forward to revision.tar.bz2/gz.

    While the URLs don't mention the project name in the filename, we do set it in the Content-Disposition header:

    $ curl -I https://bitbucket.org/brodie/cram/get/a04f56a3c828.tar.gz           ~
    HTTP/1.1 200 OK
    Server: nginx/0.7.67
    Date: Fri, 17 Dec 2010 06:34:35 GMT
    Content-Type: application/x-tar-gz
    Content-Length: 20122
    Last-Modified: Fri, 17 Dec 2010 06:34:35 GMT
    Connection: keep-alive
    Content-Disposition: attachment; filename=cram-a04f56a3c828.tar.gz
    Accept-Ranges: bytes
  3. Log in to comment