[systemd-devel] Removing image from /var/lib/machines
Peter Paule
systemd-devel at fedux.org
Fri Feb 20 05:23:23 PST 2015
Zitat von Lennart Poettering <lennart at poettering.net>:
> On Thu, 19.02.15 19:46, Peter Paule (systemd-devel at fedux.org) wrote:
>
>> BTW:
>>
>> --dkr-index-url cannot handle http redirects
>>
>> By accident I tried "http://index.docker.io" and this will be redirected to
>> "https://index.docker.io" but importd cannot handle this.
>
> I think this is actually a problem on the setup of the servers, not
> the client side.
Look at this:
% curl http://index.docker.io -I
HTTP/1.1 302 Found
Server: nginx/1.6.2
Date: Fri, 20 Feb 2015 13:12:50 GMT
Content-Type: text/html
Content-Length: 160
Location: https://index.docker.io/
Connection: keep-alive
If you try to get things from http://index.docker.io it will tell you,
that you
need to use https://index.docker.io/ instead. It might be questionable if 302
really the best status code for this - maybe they should better use 301 for
this. So, yes looking at 301 and 302 it is a server problem somehow, but not
following 302 is kind of a client problem as well I think.
But why not doing it like `curl -L`. It works both with http status 301 and
302.
% curl http://index.docker.io -I -L
HTTP/1.1 302 Found
Server: nginx/1.6.2
Date: Fri, 20 Feb 2015 13:19:27 GMT
Content-Type: text/html
Content-Length: 160
Location: https://index.docker.io/
Connection: keep-alive
HTTP/1.1 200 Connection established
HTTP/1.1 301 MOVED PERMANENTLY
Server: nginx/1.6.2
Date: Fri, 20 Feb 2015 13:19:28 GMT
Content-Type: text/html; charset=utf-8
Connection: close
X-Frame-Options: SAMEORIGIN
Location: https://registry.hub.docker.com/
Strict-Transport-Security: max-age=31536000
HTTP/1.1 200 Connection established
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Fri, 20 Feb 2015 13:19:28 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 16966
Connection: close
Vary: Cookie
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000
/pp
More information about the systemd-devel
mailing list