Module Name: src
Committed By: mrg
Date: Mon Sep 20 23:11:38 UTC 2010
Modified Files:
src/libexec/httpd: CHANGES Makefile bozohttpd.8 bozohttpd.c bozohttpd.h
cgi-bozo.c dir-index-bozo.c
Log Message:
merge bozohttpd 20100920
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/libexec/httpd/CHANGES
cvs rdiff -u -r1.11 -r1.12 src/libexec/httpd/Makefile
cvs rdiff -u -r1.22 -r1.23 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.24 -r1.25 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.16 -r1.17 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.17 -r1.18 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.10 -r1.11 src/libexec/httpd/dir-index-bozo.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/httpd/CHANGES
diff -u src/libexec/httpd/CHANGES:1.9 src/libexec/httpd/CHANGES:1.10
--- src/libexec/httpd/CHANGES:1.9 Tue Jun 22 05:24:12 2010
+++ src/libexec/httpd/CHANGES Mon Sep 20 23:11:38 2010
@@ -1,10 +1,15 @@
-$eterna: CHANGES,v 1.76 2010/06/21 06:45:45 mrg Exp $
+$eterna: CHANGES,v 1.77 2010/09/20 22:26:28 mrg Exp $
changes since bozohttpd 20100617:
o properly fully disable multi-file mode for now
o fix the -t and -U options when used without the -e option, broken since
the library-ifcation
o be explicit that logs go to the FTP facility in syslog
+ o use scandir() with alphasort() for sorted directory lists, from moof
+ o fix a serious error in vhost handling; "Host:.." would allow access to
+ the next level directory from the virtual root directory, from seanb
+ o fix some various non standard compile time errors, from rudolf
+ o fix dynamic CGI content maps, from rudolf
changes since bozohttpd 20100509:
o fix some compile issues
Index: src/libexec/httpd/Makefile
diff -u src/libexec/httpd/Makefile:1.11 src/libexec/httpd/Makefile:1.12
--- src/libexec/httpd/Makefile:1.11 Mon May 10 03:37:45 2010
+++ src/libexec/httpd/Makefile Mon Sep 20 23:11:38 2010
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.11 2010/05/10 03:37:45 mrg Exp $
+# $NetBSD: Makefile,v 1.12 2010/09/20 23:11:38 mrg Exp $
#
-# $eterna: Makefile,v 1.27 2009/05/22 21:51:38 mrg Exp $
+# $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
#
# berkeley (netbsd) makefile. see Makefile.boot for other systems.
# compile-time options are:
-# DEBUG /* include debugging support */
+# NO_DEBUG /* don't include debugging support */
# NO_USER_SUPPORT /* don't support /~user requests */
# NO_CGIBIN_SUPPORT /* don't support cgi-bin requests */
# NO_DIRINDEX_SUPPORT /* don't support directory indexing */
@@ -13,6 +13,11 @@
# NO_DYNAMIC_CONTENT /* don't support dynamic content updates */
# NO_SSL_SUPPORT /* don't support ssl (https) */
# DO_HTPASSWD /* support .htpasswd files */
+#
+# these are usually set via the "COPTS" variable, or some other method
+# for setting CFLAGS relevant to your make, eg
+# % make COPTS="-DDO_HTPASSWD"
+
COPTS+= -DDO_HTPASSWD
PROG= httpd
MAN= httpd.8
Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.22 src/libexec/httpd/bozohttpd.8:1.23
--- src/libexec/httpd/bozohttpd.8:1.22 Tue Jun 22 07:00:12 2010
+++ src/libexec/httpd/bozohttpd.8 Mon Sep 20 23:11:38 2010
@@ -1,6 +1,6 @@
-.\" $NetBSD: bozohttpd.8,v 1.22 2010/06/22 07:00:12 wiz Exp $
+.\" $NetBSD: bozohttpd.8,v 1.23 2010/09/20 23:11:38 mrg Exp $
.\"
-.\" $eterna: bozohttpd.8,v 1.98 2010/06/21 06:47:23 mrg Exp $
+.\" $eterna: bozohttpd.8,v 1.99 2010/09/20 22:26:28 mrg Exp $
.\"
.\" Copyright (c) 1997-2010 Matthew R. Green
.\" All rights reserved.
@@ -26,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 17, 2010
+.Dd September 20, 2010
.Dt HTTPD 8
.Os
.Sh NAME
@@ -464,7 +464,7 @@
and regular code audits.
This manual documents
.Nm
-version 20100621.
+version 20100920.
.Sh AUTHORS
.Nm
was written by Matthew R. Green
@@ -481,6 +481,10 @@
.Aq [email protected]
provided Range: header support
.It
+Sean Boudreau
+.Aq [email protected]
+provided an security fix for virtual hosting
+.It
Julian Coleman
.Aq [email protected]
provided an IPv6 bugfix
@@ -555,6 +559,10 @@
.Aq [email protected]
provided SSL support, cgi-bin fixes and much other random other stuff
.It
+rudolf
+.Aq [email protected]
+provided minor compile fixes and a CGI content map fix
+.It
Steve Rumble
.Aq [email protected]
provided the
Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.24 src/libexec/httpd/bozohttpd.c:1.25
--- src/libexec/httpd/bozohttpd.c:1.24 Mon Sep 20 22:18:22 2010
+++ src/libexec/httpd/bozohttpd.c Mon Sep 20 23:11:38 2010
@@ -1,6 +1,6 @@
-/* $NetBSD: bozohttpd.c,v 1.24 2010/09/20 22:18:22 mrg Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.25 2010/09/20 23:11:38 mrg Exp $ */
-/* $eterna: bozohttpd.c,v 1.174 2010/06/21 06:47:23 mrg Exp $ */
+/* $eterna: bozohttpd.c,v 1.176 2010/09/20 22:26:28 mrg Exp $ */
/*
* Copyright (c) 1997-2010 Matthew R. Green
@@ -109,7 +109,7 @@
#define INDEX_HTML "index.html"
#endif
#ifndef SERVER_SOFTWARE
-#define SERVER_SOFTWARE "bozohttpd/20100621"
+#define SERVER_SOFTWARE "bozohttpd/20100920"
#endif
#ifndef DIRECT_ACCESS_FILE
#define DIRECT_ACCESS_FILE ".bzdirect"
@@ -610,10 +610,6 @@
str,
host ? host : addr ? addr : "<local>",
port ? port : "<stdin>");
-#if 0
- debug((httpd, DEBUG_FAT,
- "read_req, getting request: ``%s''", str));
-#endif
/* we allocate return space in file and query only */
parse_request(httpd, str, &method, &file, &query, &proto);
@@ -1534,7 +1530,7 @@
bozo_flush(httpd, stdout);
}
-#ifdef DEBUG
+#ifndef NO_DEBUG
void
debug__(bozohttpd_t *httpd, int level, const char *fmt, ...)
{
@@ -1555,7 +1551,7 @@
va_end(ap);
errno = savederrno;
}
-#endif /* DEBUG */
+#endif /* NO_DEBUG */
/* these are like warn() and err(), except for syslog not stderr */
void
Index: src/libexec/httpd/bozohttpd.h
diff -u src/libexec/httpd/bozohttpd.h:1.16 src/libexec/httpd/bozohttpd.h:1.17
--- src/libexec/httpd/bozohttpd.h:1.16 Thu Sep 9 04:41:49 2010
+++ src/libexec/httpd/bozohttpd.h Mon Sep 20 23:11:38 2010
@@ -1,6 +1,6 @@
-/* $NetBSD: bozohttpd.h,v 1.16 2010/09/09 04:41:49 mrg Exp $ */
+/* $NetBSD: bozohttpd.h,v 1.17 2010/09/20 23:11:38 mrg Exp $ */
-/* $eterna: bozohttpd.h,v 1.35 2010/06/17 00:49:30 mrg Exp $ */
+/* $eterna: bozohttpd.h,v 1.37 2010/09/20 22:26:28 mrg Exp $ */
/*
* Copyright (c) 1997-2010 Matthew R. Green
@@ -163,13 +163,13 @@
#define strornull(x) ((x) ? (x) : "<null>")
-#ifdef DEBUG
+#ifndef NO_DEBUG
void debug__(bozohttpd_t *, int, const char *, ...)
__attribute__((__format__(__printf__, 3, 4)));
#define debug(x) debug__ x
#else
#define debug(x)
-#endif /* DEBUG */
+#endif /* NO_DEBUG */
void bozo_warn(bozohttpd_t *, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
Index: src/libexec/httpd/cgi-bozo.c
diff -u src/libexec/httpd/cgi-bozo.c:1.17 src/libexec/httpd/cgi-bozo.c:1.18
--- src/libexec/httpd/cgi-bozo.c:1.17 Thu Jun 17 19:43:30 2010
+++ src/libexec/httpd/cgi-bozo.c Mon Sep 20 23:11:38 2010
@@ -1,6 +1,6 @@
-/* $NetBSD: cgi-bozo.c,v 1.17 2010/06/17 19:43:30 mrg Exp $ */
+/* $NetBSD: cgi-bozo.c,v 1.18 2010/09/20 23:11:38 mrg Exp $ */
-/* $eterna: cgi-bozo.c,v 1.37 2010/06/09 07:54:16 mrg Exp $ */
+/* $eterna: cgi-bozo.c,v 1.38 2010/09/20 22:25:00 mrg Exp $ */
/*
* Copyright (c) 1997-2010 Matthew R. Green
@@ -507,6 +507,7 @@
map = bozo_get_content_map(httpd, arg);
map->name = arg;
+ map->namelen = strlen(map->name);
map->type = map->encoding = map->encoding11 = NULL;
map->cgihandler = cgihandler;
}
Index: src/libexec/httpd/dir-index-bozo.c
diff -u src/libexec/httpd/dir-index-bozo.c:1.10 src/libexec/httpd/dir-index-bozo.c:1.11
--- src/libexec/httpd/dir-index-bozo.c:1.10 Mon Aug 16 18:32:44 2010
+++ src/libexec/httpd/dir-index-bozo.c Mon Sep 20 23:11:38 2010
@@ -1,6 +1,6 @@
-/* $NetBSD: dir-index-bozo.c,v 1.10 2010/08/16 18:32:44 dogcow Exp $ */
+/* $NetBSD: dir-index-bozo.c,v 1.11 2010/09/20 23:11:38 mrg Exp $ */
-/* $eterna: dir-index-bozo.c,v 1.17 2010/05/10 02:51:28 mrg Exp $ */
+/* $eterna: dir-index-bozo.c,v 1.18 2010/09/20 22:26:29 mrg Exp $ */
/*
* Copyright (c) 1997-2010 Matthew R. Green