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