mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
abc5bcad874fccb938a9268bf2c6f18e6a3a91b2
When sending a bad URL in the fromSrc parameter using cURL the response will have status code 200 while it should have 404 or 500 (depends on the error). This commit addresses this problem in the following ways: * Before, `src` was parsed using url.Parse and if the returned `url.Scheme` was empty it was set to 'http' and `url.Host` was set to `src`. This is bad because if `src` was 'web.com/tars/image1.tar' The `url.String()` returns 'web.com%2Ftars%2Fimage1.tar` which will cause the daemon to fail downloading the file * Before writing the "Downloading" message, the image is attempted to be downloaded and if there is no error the "Downloading" message is sent. Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com> Upstream-commit: e050f1760dd8a3d48d95bb3d2de503fc4177ff5f Component: engine
Description
Интерфейс командной строки Docker
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%