From: Felix Fietkau Date: Sat, 29 Mar 2014 19:25:30 +0000 (+0100) Subject: fix specifying ports in urls X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuclient.git;a=commitdiff_plain;h=dead014a7fa7a974d0ec8ef9294bc2c2092ce9f3;hp=760cd6fe53316248039395257b35d77f413c1cbb fix specifying ports in urls Signed-off-by: Felix Fietkau --- 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;