Two (conflicting) Content-Type Headers for tar.{gz,bz2} archives
Gitlab workhorse delivers the content-type header for archives twice. For zip archives it is application/zip, for tar archives it is text/html and application/octet-stream. This leads to text/html mime type downloads in our Apache setup.
We use gitlab omnibus, currently 8.13.5
curl -I http://127.0.0.1:8282/urz-django/tuc2014/repository/archive.zip?ref=master
HTTP/1.1 200 OK
Cache-Control: no-cache
Cache-Control: private
Content-Disposition: attachment; filename="tuc2014-master-16dce2c0071d07d6e090d85926bd0b6c1144d4ba.zip"
Content-Transfer-Encoding: binary
Content-Type: application/zip
Content-Type: application/zip
Date: Tue, 22 Nov 2016 10:04:35 GMT
Set-Cookie: request_method=HEAD; path=/
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: 265c5a78-08f6-4f74-879d-4c6ee9d3b959
X-Runtime: 0.022015
X-Ua-Compatible: IE=edge
X-Xss-Protection: 1; mode=block
curl -I http://127.0.0.1:8282/urz-django/tuc2014/repository/archive.tar.bz2?ref=master
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: no-cache
Cache-Control: private
Content-Disposition: attachment; filename="tuc2014-master-16dce2c0071d07d6e090d85926bd0b6c1144d4ba.tar.bz2"
Content-Length: 25021
Content-Transfer-Encoding: binary
Content-Type: text/html
Content-Type: application/octet-stream
Date: Tue, 22 Nov 2016 10:04:31 GMT
Set-Cookie: request_method=HEAD; path=/
Strict-Transport-Security: max-age=31536000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: 7e28e7ff-6e7a-4d98-a397-5ca78671fdd4
X-Runtime: 0.024748
X-Ua-Compatible: IE=edge
X-Xss-Protection: 1; mode=block