diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/bozohttpd/Makefile | 7 | ||||
-rw-r--r-- | www/bozohttpd/files/md5 | 4 | ||||
-rw-r--r-- | www/bozohttpd/files/patch-sum | 5 | ||||
-rw-r--r-- | www/bozohttpd/patches/patch-ab | 41 | ||||
-rw-r--r-- | www/bozohttpd/patches/patch-ac | 93 |
5 files changed, 14 insertions, 136 deletions
diff --git a/www/bozohttpd/Makefile b/www/bozohttpd/Makefile index 8e12269bd7f..7114d8ddcf8 100644 --- a/www/bozohttpd/Makefile +++ b/www/bozohttpd/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.4 2000/08/23 12:24:41 jlam Exp $ +# $NetBSD: Makefile,v 1.5 2000/08/27 09:04:31 itojun Exp $ # -DISTNAME= bozohttpd-5.05 -PKGNAME= ${DISTNAME}nb1 +DISTNAME= bozohttpd-5.06 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_LOCAL} @@ -11,6 +10,8 @@ EXTRACT_SUFX= .tar.bz2 MAINTAINER= packages@netbsd.org HOMEPAGE= http://www.eterna.com.au/bozohttpd/ +BUILD_DEFS+= USE_INET6 + .include "../../mk/bsd.prefs.mk" .if defined(USE_INET6) && (${USE_INET6} == "YES") diff --git a/www/bozohttpd/files/md5 b/www/bozohttpd/files/md5 index 11e9fbdb049..918fb86fc56 100644 --- a/www/bozohttpd/files/md5 +++ b/www/bozohttpd/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.5 2000/08/23 12:24:42 jlam Exp $ +$NetBSD: md5,v 1.6 2000/08/27 09:04:31 itojun Exp $ -MD5 (bozohttpd-5.05.tar.bz2) = e51b8fa1277e49d06700999c891bb2e0 +MD5 (bozohttpd-5.06.tar.bz2) = 485232daba1661eaa194dab05ef38988 diff --git a/www/bozohttpd/files/patch-sum b/www/bozohttpd/files/patch-sum index eab45e7fa50..34036da36c3 100644 --- a/www/bozohttpd/files/patch-sum +++ b/www/bozohttpd/files/patch-sum @@ -1,5 +1,4 @@ -$NetBSD: patch-sum,v 1.4 2000/08/23 12:24:42 jlam Exp $ +$NetBSD: patch-sum,v 1.5 2000/08/27 09:04:31 itojun Exp $ MD5 (patch-aa) = c02c925955768359ff9fdcb5be35582d -MD5 (patch-ab) = 19043309a67e73ba33f13d9ec1ba0285 -MD5 (patch-ac) = 7e0ae73e85fa65acd024f1a8bd0b5dd4 +MD5 (patch-ab) = 3da41d9dc8351deebc89203830e2f903 diff --git a/www/bozohttpd/patches/patch-ab b/www/bozohttpd/patches/patch-ab index 4836c475f41..035a6ad319e 100644 --- a/www/bozohttpd/patches/patch-ab +++ b/www/bozohttpd/patches/patch-ab @@ -1,38 +1,9 @@ -$NetBSD: patch-ab,v 1.4 2000/08/23 12:24:42 jlam Exp $ - ---- bozohttpd.8.orig Tue May 23 03:14:38 2000 -+++ bozohttpd.8 -@@ -59,7 +59,7 @@ - The following options are available: - .Bl -tag -width xxxcgibin - .It Fl n --This options stops -+This option stops - .Nm - from doing IP address to name resolution of hosts for setting the - .Ev REMOTE_HOST -@@ -68,7 +68,7 @@ - .Fl c - option. - .It Fl r --This options causes -+This option causes - .Nm - to automatically redirect Uniform Resource Locators that have their - trailing slash missing. The default behaviour is to send a message -@@ -112,12 +112,13 @@ - .Xr inetd.conf 5 +$NetBSD: patch-ab,v 1.5 2000/08/27 09:04:31 itojun Exp $ +--- bozohttpd.8.orig Fri Aug 25 03:17:05 2000 ++++ bozohttpd.8 Sun Aug 27 02:02:10 2000 +@@ -112,3 +112,4 @@ entry would be: - .Dl www stream tcp nowait httpd /usr/pkg/libexec/httpd httpd /var/www +-.Dl www stream tcp nowait httpd /usr/pkg/libexec/httpd httpd /var/www ++.Dl www stream tcp nowait httpd /usr/pkg/libexec/httpd httpd /var/www +.Dl www stream tcp6 nowait httpd /usr/pkg/libexec/httpd httpd /var/www .Pp - Using the - .Nx - .Xr inetd 8 , --you an provide multiple IP-address based HTTP servers by having mulitple --listening port with different configurations. -+you can provide multiple IP-address-based HTTP servers by having multiple -+listening ports with different configurations. - .Sh NOTES - This server supports the - .Em HTTP/0.9 , diff --git a/www/bozohttpd/patches/patch-ac b/www/bozohttpd/patches/patch-ac deleted file mode 100644 index c3dba037488..00000000000 --- a/www/bozohttpd/patches/patch-ac +++ /dev/null @@ -1,93 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2000/08/23 12:24:42 jlam Exp $ - -itojun's patch for IPv6 support as provided tech-pkg@netbsd.org at 20000815. - ---- bozohttpd.c.orig Tue May 23 03:14:30 2000 -+++ bozohttpd.c -@@ -913,14 +913,20 @@ - http_req *request; - { - struct _headers *headp; -+#ifdef INET6 -+ char hbuf[NI_MAXHOST], abuf[NI_MAXSERV]; -+ struct sockaddr_storage ss; -+#else -+ struct sockaddr ss; -+ struct sockaddr_in *sin; - struct hostent *hp; -- struct sockaddr_in in; -+#endif - char *host, *addr, *port, *info, *type, *clen, *query, *s, *t, - *path, *env, *command = NULL, - *url = strdup(request->url + strlen("/cgi-bin")); - char **envp, *argv[3]; - char bufport[10]; -- int envpsize, ix, slen = sizeof(in); -+ int envpsize, ix, slen = sizeof(ss); - - debug((DEBUG_FAT, "process_cgi: writing HTTP header ..")); - -@@ -952,23 +958,52 @@ - type = request->content_type; - clen = request->content_length; - -- if (getpeername(0, (struct sockaddr *)&in, &slen) < 0) -+ if (getpeername(0, (struct sockaddr *)&ss, &slen) < 0) - host = addr = NULL; - else { -- addr = inet_ntoa(in.sin_addr); -- -- if (nflag == 0 || (hp = gethostbyaddr((char *)&in.sin_addr, -- sizeof(in.sin_addr), AF_INET)) == NULL) -- host = NULL; -- else -- host = hp->h_name; -+#ifdef INET6 -+ addr = host = NULL; -+ if (getnameinfo((struct sockaddr *)&ss, slen, -+ abuf, sizeof abuf, NULL, 0, NI_NUMERICHOST) == 0) -+ addr = abuf; -+ if (nflag != 0 && getnameinfo((struct sockaddr *)&ss, slen, -+ hbuf, sizeof hbuf, NULL, 0, 0) == 0) -+ host = hbuf; -+#else -+ switch (((struct sockaddr *)&ss)->sa_family) { -+ case AF_INET: -+ sin = (struct sockaddr_in *)&ss; -+ addr = inet_ntoa(sin->sin_addr); -+ if (nflag == 0 || -+ (hp = gethostbyaddr((char *)&sin->sin_addr, -+ sizeof(sin->sin_addr), AF_INET)) == NULL) -+ host = NULL; -+ else -+ host = hp->h_name; -+ break; -+ default: -+ host = addr = NULL; -+ break; -+ } -+#endif - } - -- if (getsockname(0, (struct sockaddr *)&in, &slen) < 0) -+ slen = sizeof(ss); -+ if (getsockname(0, (struct sockaddr *)&ss, &slen) < 0) - port = NULL; -- else -+ else { -+#ifdef INET6 -+ if (getnameinfo((struct sockaddr *)&ss, slen, NULL, 0, -+ bufport, sizeof bufport, NI_NUMERICSERV) == 0) -+ port = bufport; -+ else -+ port = NULL; -+#else -+ sin = (struct sockaddr_in *)&ss; - (void)snprintf(port = bufport, sizeof bufport, "%d", -- ntohs(in.sin_port)); -+ ntohs(sin->sin_port)); -+#endif -+ } - - envpsize = 10 + request->nheaders + - (info && *info ? 1 : 0) + |