tag:help.rubygems.org,2010-01-19:/discussions/problems/21223-invalid-content-type-header-when-downloading-gem-archiveRubyGems.org: Discussion 2018-10-18T19:51:26Ztag:help.rubygems.org,2010-01-19:Comment/374936392015-08-06T12:26:19Z2015-08-06T12:26:19ZInvalid Content-Type header when downloading gem archive<div><p>Ping! Any thoughts about this issue? Thanks.</p></div>David Thompsontag:help.rubygems.org,2010-01-19:Comment/374936392015-08-06T14:22:13Z2015-08-06T14:22:13ZInvalid Content-Type header when downloading gem archive<div><p>Can you give us more details about what the issue is?</p></div>David Radcliffetag:help.rubygems.org,2010-01-19:Comment/374936392015-08-06T18:56:10Z2015-08-06T18:56:11ZInvalid Content-Type header when downloading gem archive<div><p>I don't know what happened, but the explanation of the problem
that I originally posted on 7/27 is no longer visible, so let's try
again:</p>
<p>The HTTP responses for gem archive URIs include an invalid
Content-Type header:</p>
<pre>
<code>Content-Type:</code>
</pre>
<p>Strict HTTP clients refuse to process these responses. Here's
the output of the headers for a gem download as seen via curl:</p>
<pre>
<code>$ curl -L --head https://rubygems.org/downloads/i18n-0.7.0.gem
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Thu, 06 Aug 2015 18:53:12 GMT
Content-Type: text/html
Content-Length: 154
Location: https://rubygems.org/gems/i18n-0.7.0.gem
Connection: keep-alive
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Thu, 06 Aug 2015 18:53:12 GMT
Content-Type: text/html
Content-Length: 154
Connection: keep-alive
Location: https://rubygems.global.ssl.fastly.net/gems/i18n-0.7.0.gem
HTTP/1.1 200 OK
x-amz-id-2: 6+imAqBI/ZTgKqikhppmKOeqntzJw8NFNcVcdr10GpFemSJ7oWuRuwzA5bKq8JK5EEhDlEVd8K8=
x-amz-request-id: E887AAB6CED5B428
x-amz-version-id: oAqCyUaQvHWAG.k6pfnbCFVpfEG5vHGa
Last-Modified: Fri, 19 Dec 2014 17:06:33 GMT
ETag: "e9f92faf73a805a95c92d42031f4dca3"
Content-Type:
Server: AmazonS3
Content-Length: 57856
Accept-Ranges: bytes
Date: Thu, 06 Aug 2015 18:53:18 GMT
Via: 1.1 varnish
Age: 3593
Connection: keep-alive
X-Served-By: cache-iad2139-IAD
X-Cache: HIT
X-Cache-Hits: 30
X-Log-Message: for=request method=HEAD path=/production.s3.rubygems.org/gems/i18n-0.7.0.gem fwd="216.236.243.66" status=200 bytes=57856 cache=HIT cache_hits=30 timing="(null)"</code>
</pre>
<p>Could a valid mime type be used with these files? Thanks for
your help!</p></div>David Thompsontag:help.rubygems.org,2010-01-19:Comment/374936392015-08-11T12:19:47Z2015-08-11T12:19:47ZInvalid Content-Type header when downloading gem archive<div><p>Ping. Can anyone confirm that this is indeed an issue?
Thanks.</p></div>David Thompsontag:help.rubygems.org,2010-01-19:Comment/374936392015-08-16T15:45:15Z2015-08-16T15:45:15ZInvalid Content-Type header when downloading gem archive<div><p>Hey,<br>
This was indeed a problem and it should be solved now. All
responses should have a valid Content-Type now.<br>
Thanks for reporting!<br>
-David</p></div>David Radcliffetag:help.rubygems.org,2010-01-19:Comment/374936392015-08-16T16:52:53Z2015-08-16T16:52:54ZInvalid Content-Type header when downloading gem archive<div><p>Thank you, David! Much appreciated. Happy hacking!</p></div>David Thompson