ソースを参照

fix specifying ports in urls

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Felix Fietkau 10 年 前
コミット
dead014a7f
1 ファイル変更3 行追加1 行削除
  1. 3 1
      uclient.c

+ 3 - 1
uclient.c

@@ -101,8 +101,10 @@ uclient_get_url(const char *url_str, const char *auth_str)
 			url->port = next + 1;
 	} else {
 		next = strrchr(url->host, ':');
-		if (next)
+		if (next) {
+			*next = 0;
 			url->port = next + 1;
+		}
 	}
 
 	return url;