From: Gilles Detillieux To: htdig@htdig.org Subject: [htdig] Patch This patch fixes PR#348, to make sure a missing or invalid port number will get set correctly. --- htdig-3.1.2.bak/htlib/URL.cc Wed Apr 21 21:47:58 1999 +++ htdig-3.1.2/htlib/URL.cc Wed Aug 4 13:09:01 1999 @@ -282,6 +282,8 @@ void URL::parse(char *u) p = strtok(0, "/"); if (p) _port = atoi(p); + if (!p || _port <= 0) + _port = 80; } else {