diff options
author | fenner <fenner@FreeBSD.org> | 1999-02-03 20:24:53 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1999-02-03 20:24:53 +0000 |
commit | af6685ec337a58b54afcd24d9b93bd69225e9d73 (patch) | |
tree | 7d4bacb35e3ebf4e2602dad7e103df4bac74625c /usr.bin/fetch/http.c | |
parent | 1d35d983895b8a2f7e09546e35cb470e721a1778 (diff) | |
download | FreeBSD-src-af6685ec337a58b54afcd24d9b93bd69225e9d73.zip FreeBSD-src-af6685ec337a58b54afcd24d9b93bd69225e9d73.tar.gz |
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 <watanabe@komadori.planet.kobe-u.ac.jp>
Diffstat (limited to 'usr.bin/fetch/http.c')
-rw-r--r-- | usr.bin/fetch/http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c index 2f08c1d..e6795eb 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 <sys/types.h> @@ -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; |