From 9b5f0fac81367b9a1b4d09b87b9a8bd0fc92635a Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Fri, 22 Mar 2013 19:47:32 -0700 Subject: [PATCH] Fix 'docker import' to accept urls without explicit http:// scheme --- commands.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands.go b/commands.go index d93eadfc1..6e8342ea3 100644 --- a/commands.go +++ b/commands.go @@ -374,6 +374,8 @@ func (srv *Server) CmdImport(stdin io.ReadCloser, stdout io.Writer, args ...stri } if u.Scheme == "" { u.Scheme = "http" + u.Host = src + u.Path = "" } fmt.Fprintf(stdout, "Downloading from %s\n", u.String()) // Download with curl (pretty progress bar)