From 93eb50393dfea7ab2f4d8b031f7072e2d8cf9bd2 Mon Sep 17 00:00:00 2001 From: Bill Fenner Date: Wed, 3 Feb 1999 20:24:53 +0000 Subject: [PATCH] Don't try to parse a colon in a URL as a port (e.g. http://www.host.name/foo:bar) PR: bin/5072 Submitted by: Takeshi WATANABE --- usr.bin/fetch/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c index 2f08c1d2be0..e6795eb593b 100644 --- a/usr.bin/fetch/http.c +++ b/usr.bin/fetch/http.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: http.c,v 1.23 1999/01/15 16:56:22 wollman Exp $ + * $Id: http.c,v 1.24 1999/01/15 17:10:31 wollman Exp $ */ #include @@ -165,7 +165,7 @@ http_parse(struct fetch_state *fs, const char *u) strncat(hostname, p, q - p); p = slash; - if (colon && colon + 1 != slash) { + if (q == colon && colon + 1 != slash) { unsigned long ul; char *ep;