浏览代码

fix http port parsing

Darien Raymond 8 年之前
父节点
当前提交
10712b3235
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      proxy/http/server.go

+ 1 - 1
proxy/http/server.go

@@ -54,7 +54,7 @@ func parseHost(rawHost string, defaultPort net.Port) (net.Destination, error) {
 		} else {
 		} else {
 			return net.Destination{}, err
 			return net.Destination{}, err
 		}
 		}
-	} else {
+	} else if len(rawPort) > 0 {
 		intPort, err := strconv.Atoi(rawPort)
 		intPort, err := strconv.Atoi(rawPort)
 		if err != nil {
 		if err != nil {
 			return net.Destination{}, err
 			return net.Destination{}, err