summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjoerg <joerg>2008-11-04 16:14:24 +0000
committerjoerg <joerg>2008-11-04 16:14:24 +0000
commitfd921319ce70bf75314b7c50125d12b75618d999 (patch)
treed53dc1cecd2c364b679c22bc0be0c427acd32c32 /net
parent118b709b220df4e21f35576e7efea55217237f36 (diff)
downloadpkgsrc-fd921319ce70bf75314b7c50125d12b75618d999.tar.gz
libfetch-2.20:
Allow HTTP basic auth to be specified in the URL. Also allow : in the password while here.
Diffstat (limited to 'net')
-rw-r--r--net/libfetch/Makefile4
-rw-r--r--net/libfetch/files/fetch.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/net/libfetch/Makefile b/net/libfetch/Makefile
index 180cb9af847..870399468ed 100644
--- a/net/libfetch/Makefile
+++ b/net/libfetch/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2008/10/10 22:51:41 joerg Exp $
+# $NetBSD: Makefile,v 1.23 2008/11/04 16:14:24 joerg Exp $
#
-DISTNAME= libfetch-2.19
+DISTNAME= libfetch-2.20
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/net/libfetch/files/fetch.c b/net/libfetch/files/fetch.c
index 20edad4c191..519a5b5ef80 100644
--- a/net/libfetch/files/fetch.c
+++ b/net/libfetch/files/fetch.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.14 2008/10/10 22:51:41 joerg Exp $ */
+/* $NetBSD: fetch.c,v 1.15 2008/11/04 16:14:24 joerg Exp $ */
/*-
* Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>
@@ -417,7 +417,7 @@ fetchParseURL(const char *URL)
}
URL += 2;
p = URL;
- goto find_hostname;
+ goto find_user;
}
if (strncmp(URL, "ftp:", 4) == 0) {
pre_quoted = 1;
@@ -446,7 +446,7 @@ find_user:
/* password */
if (*q == ':') {
- for (q++, i = 0; (*q != ':') && (*q != '@'); q++)
+ for (q++, i = 0; (*q != '@'); q++)
if (i < URL_PWDLEN)
u->pwd[i++] = *q;
}
@@ -456,7 +456,6 @@ find_user:
p = URL;
}
-find_hostname:
/* hostname */
#ifdef INET6
if (*p == '[' && (q = strchr(p + 1, ']')) != NULL &&