From ed0342f1717cc13a3122eb2e30fd784e7a6fa60c Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 16 Mar 2016 11:27:53 -0600 Subject: [PATCH] Fix tests on Go tip (caused by golang/go#14827) --- caddy/parse/parsing.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/caddy/parse/parsing.go b/caddy/parse/parsing.go index b5294de5..26999db5 100644 --- a/caddy/parse/parsing.go +++ b/caddy/parse/parsing.go @@ -324,7 +324,9 @@ func standardAddress(str string) (address, error) { host, port, err := net.SplitHostPort(str) if err != nil { host, port, err = net.SplitHostPort(str + ":") - // no error check here; return err at end of function + if err != nil { + host = str + } } // see if we can set port based off scheme