summaryrefslogtreecommitdiff
path: root/cmd/podman/parse
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-07-24 05:53:16 -0400
committerGitHub <noreply@github.com>2021-07-24 05:53:16 -0400
commitc44c298ae7b5ce1da2aeff5b920de65767966007 (patch)
tree3c949238461e4d6bfc63a2dc49fb9628b44e9ace /cmd/podman/parse
parent2f79497aba90229664c35fb738704d61e4528f44 (diff)
parentdcb5c92c0d94c81f0706cd282b55a2a9d1fde30f (diff)
downloadpodman-c44c298ae7b5ce1da2aeff5b920de65767966007.tar.gz
podman-c44c298ae7b5ce1da2aeff5b920de65767966007.tar.bz2
podman-c44c298ae7b5ce1da2aeff5b920de65767966007.zip
Merge pull request #11018 from vrothberg/fix-10994
import: write stdin to tmp file
Diffstat (limited to 'cmd/podman/parse')
-rw-r--r--cmd/podman/parse/net.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/podman/parse/net.go b/cmd/podman/parse/net.go
index f93c4ab1e..870690db3 100644
--- a/cmd/podman/parse/net.go
+++ b/cmd/podman/parse/net.go
@@ -180,9 +180,12 @@ func ValidateFileName(filename string) error {
// ValidURL checks a string urlStr is a url or not
func ValidURL(urlStr string) error {
- _, err := url.ParseRequestURI(urlStr)
+ url, err := url.ParseRequestURI(urlStr)
if err != nil {
- return errors.Wrapf(err, "invalid url path: %q", urlStr)
+ return errors.Wrapf(err, "invalid url %q", urlStr)
+ }
+ if url.Scheme == "" {
+ return errors.Errorf("invalid url %q: missing scheme", urlStr)
}
return nil
}