summaryrefslogtreecommitdiff
path: root/uclient.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-03-29 20:25:30 +0100
committerFelix Fietkau <nbd@openwrt.org>2014-03-29 20:25:30 +0100
commitdead014a7fa7a974d0ec8ef9294bc2c2092ce9f3 (patch)
treee557cacf4d94836e41cfebcd8615c2ad091c1068 /uclient.c
parent760cd6fe53316248039395257b35d77f413c1cbb (diff)
downloaduclient-dead014a7fa7a974d0ec8ef9294bc2c2092ce9f3.tar.gz
fix specifying ports in urls
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uclient.c')
-rw-r--r--uclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/uclient.c b/uclient.c
index 2ac052d..82553a5 100644
--- a/uclient.c
+++ b/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;