Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/httpd merge bozohttpd 20111118
details: https://anonhg.NetBSD.org/src/rev/6e73a193136d
branches: trunk
changeset: 771287:6e73a193136d
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Nov 18 09:51:31 2011 +0000
description:
merge bozohttpd 20111118
diffstat:
libexec/httpd/CHANGES | 11 +-
libexec/httpd/auth-bozo.c | 6 +-
libexec/httpd/bozohttpd.8 | 14 +-
libexec/httpd/bozohttpd.c | 8 +-
libexec/httpd/bozohttpd.h | 25 +-
libexec/httpd/bozohttpd.html8 | 618 ---------------------------------------
libexec/httpd/cgi-bozo.c | 6 +-
libexec/httpd/content-bozo.c | 6 +-
libexec/httpd/daemon-bozo.c | 6 +-
libexec/httpd/dir-index-bozo.c | 6 +-
libexec/httpd/main.c | 8 +-
libexec/httpd/ssl-bozo.c | 6 +-
libexec/httpd/testsuite/html_cmp | 10 +-
libexec/httpd/tilde-luzah-bozo.c | 6 +-
14 files changed, 63 insertions(+), 673 deletions(-)
diffs (truncated from 938 to 300 lines):
diff -r ff50bdbabbcd -r 6e73a193136d libexec/httpd/CHANGES
--- a/libexec/httpd/CHANGES Fri Nov 18 09:17:09 2011 +0000
+++ b/libexec/httpd/CHANGES Fri Nov 18 09:51:31 2011 +0000
@@ -1,4 +1,13 @@
-$eterna: CHANGES,v 1.77 2010/09/20 22:26:28 mrg Exp $
+$eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $
+
+changes since bozohttpd 20100920:
+ o add -P <pidfile> option, from jmmv%netbsd.org@localhost
+ o avoid crashes with http basic auth, from pooka%netbsd.org@localhost
+ o add support for REDIRECT_STATUS variable, from tls%netbsd.org@localhost
+ o support .mp4 files in the default map
+ o directory indexes with files with : are now displayed properly, from
+ reed%netbsd.org@localhost
+ o allow -I option to be useful in non-inetd mode as well
changes since bozohttpd 20100617:
o properly fully disable multi-file mode for now
diff -r ff50bdbabbcd -r 6e73a193136d libexec/httpd/auth-bozo.c
--- a/libexec/httpd/auth-bozo.c Fri Nov 18 09:17:09 2011 +0000
+++ b/libexec/httpd/auth-bozo.c Fri Nov 18 09:51:31 2011 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: auth-bozo.c,v 1.9 2010/05/10 14:44:19 mrg Exp $ */
+/* $NetBSD: auth-bozo.c,v 1.10 2011/11/18 09:51:31 mrg Exp $ */
-/* $eterna: auth-bozo.c,v 1.16 2010/05/10 14:36:37 mrg Exp $ */
+/* $eterna: auth-bozo.c,v 1.17 2011/11/18 09:21:15 mrg Exp $ */
/*
- * Copyright (c) 1997-2010 Matthew R. Green
+ * Copyright (c) 1997-2011 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff -r ff50bdbabbcd -r 6e73a193136d libexec/httpd/bozohttpd.8
--- a/libexec/httpd/bozohttpd.8 Fri Nov 18 09:17:09 2011 +0000
+++ b/libexec/httpd/bozohttpd.8 Fri Nov 18 09:51:31 2011 +0000
@@ -1,6 +1,6 @@
-.\" $NetBSD: bozohttpd.8,v 1.31 2011/11/17 23:19:30 wiz Exp $
+.\" $NetBSD: bozohttpd.8,v 1.32 2011/11/18 09:51:31 mrg Exp $
.\"
-.\" $eterna: bozohttpd.8,v 1.99 2010/09/20 22:26:28 mrg Exp $
+.\" $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
.\"
.\" Copyright (c) 1997-2010 Matthew R. Green
.\" All rights reserved.
@@ -34,19 +34,19 @@
.Nd hyper text transfer protocol version 1.1 daemon
.Sh SYNOPSIS
.Nm
-.Op Fl befHnrsuVX
+.Op Fl CIMPSZciptvx
.Op Fl C Ar suffix cgihandler
-.Op Fl c Ar cgibin
.Op Fl I Ar port
-.Op Fl i Ar address
.Op Fl M Ar suffix type encoding encoding11
.Op Fl P Ar pidfile
+.Op Fl S Ar server_software
+.Op Fl Z Ar cert privkey
+.Op Fl c Ar cgibin
+.Op Fl i Ar address
.Op Fl p Ar pubdir
-.Op Fl S Ar server_software
.Op Fl t Ar chrootdir
.Op Fl v Ar virtualroot
.Op Fl x Ar index
-.Op Fl Z Ar cert privkey
.Ar slashdir
.Op Ar myname
.Sh DESCRIPTION
diff -r ff50bdbabbcd -r 6e73a193136d libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Fri Nov 18 09:17:09 2011 +0000
+++ b/libexec/httpd/bozohttpd.c Fri Nov 18 09:51:31 2011 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: bozohttpd.c,v 1.29 2011/11/17 22:09:12 mrg Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.30 2011/11/18 09:51:31 mrg Exp $ */
-/* $eterna: bozohttpd.c,v 1.176 2010/09/20 22:26:28 mrg Exp $ */
+/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
/*
- * Copyright (c) 1997-2010 Matthew R. Green
+ * Copyright (c) 1997-2011 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -109,7 +109,7 @@
#define INDEX_HTML "index.html"
#endif
#ifndef SERVER_SOFTWARE
-#define SERVER_SOFTWARE "bozohttpd/20100920"
+#define SERVER_SOFTWARE "bozohttpd/20111118"
#endif
#ifndef DIRECT_ACCESS_FILE
#define DIRECT_ACCESS_FILE ".bzdirect"
diff -r ff50bdbabbcd -r 6e73a193136d libexec/httpd/bozohttpd.h
--- a/libexec/httpd/bozohttpd.h Fri Nov 18 09:17:09 2011 +0000
+++ b/libexec/httpd/bozohttpd.h Fri Nov 18 09:51:31 2011 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: bozohttpd.h,v 1.19 2011/08/27 15:33:59 joerg Exp $ */
+/* $NetBSD: bozohttpd.h,v 1.20 2011/11/18 09:51:31 mrg Exp $ */
-/* $eterna: bozohttpd.h,v 1.37 2010/09/20 22:26:28 mrg Exp $ */
+/* $eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $ */
/*
- * Copyright (c) 1997-2010 Matthew R. Green
+ * Copyright (c) 1997-2011 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,6 @@
* SUCH DAMAGE.
*
*/
-
#ifndef BOZOHTTOPD_H_
#define BOZOHTTOPD_H_ 1
@@ -197,10 +196,10 @@
/* ssl-bozo.c */
#ifdef NO_SSL_SUPPORT
-#define bozo_ssl_set_opts(w, x, y) /* nothing */
-#define bozo_ssl_init(x) /* nothing */
-#define bozo_ssl_accept(x) /* nothing */
-#define bozo_ssl_destroy(x) /* nothing */
+#define bozo_ssl_set_opts(w, x, y) do { /* nothing */ } while (0)
+#define bozo_ssl_init(x) do { /* nothing */ } while (0)
+#define bozo_ssl_accept(x) do { /* nothing */ } while (0)
+#define bozo_ssl_destroy(x) do { /* nothing */ } while (0)
#else
void bozo_ssl_set_opts(bozohttpd_t *, const char *, const char *);
void bozo_ssl_init(bozohttpd_t *);
@@ -220,11 +219,11 @@
int bozo_auth_cgi_count(bozo_httpreq_t *);
#else
#define bozo_auth_check(x, y) 0
-#define bozo_auth_cleanup(x) /* nothing */
+#define bozo_auth_cleanup(x) do { /* nothing */ } while (0)
#define bozo_auth_check_headers(y, z, a, b) 0
#define bozo_auth_check_special_files(x, y) 0
-#define bozo_auth_check_401(x, y) /* nothing */
-#define bozo_auth_cgi_setenv(x, y) /* nothing */
+#define bozo_auth_check_401(x, y) do { /* nothing */ } while (0)
+#define bozo_auth_cgi_setenv(x, y) do { /* nothing */ } while (0)
#define bozo_auth_cgi_count(x) 0
#endif /* DO_HTPASSWD */
@@ -242,9 +241,9 @@
/* daemon-bozo.c */
#ifdef NO_DAEMON_MODE
-#define bozo_daemon_init(x) /* nothing */
+#define bozo_daemon_init(x) do { /* nothing */ } while (0)
#define bozo_daemon_fork(x) 0
-#define bozo_daemon_closefds(x) /* nothing */
+#define bozo_daemon_closefds(x) do { /* nothing */ } while (0)
#else
void bozo_daemon_init(bozohttpd_t *);
int bozo_daemon_fork(bozohttpd_t *);
diff -r ff50bdbabbcd -r 6e73a193136d libexec/httpd/bozohttpd.html8
--- a/libexec/httpd/bozohttpd.html8 Fri Nov 18 09:17:09 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,618 +0,0 @@
-<html>
-<head>
- <title>
- September 20, 2010 BOZOHTTPD 8 BOZOS
-
- </title>
- <style type="text/css">
- <!--
- body { margin-left:4%; }
- H1, H2, H3, H4, H5 {
- color: maroon; padding: 4pt; margin-left: -4%;
- border: solid; border-width: thin; width: 100%;
- background: rgb(204,204,255)
- }
- -->
- </style>
-</head>
-<body bgcolor="#FFFFFF" text="#000000">
- <h3 id="NAME">
- NAME
- </h3>
-<b>bozohttpd</b>
-- hyper text transfer protocol version 1.1 daemon
- <h3 id="SYNOPSIS">
- SYNOPSIS
- </h3>
-<b>bozohttpd</b>
-[<b>-</b><b>HVXbefnrus</b>]
-[<b>-</b><b>C</b><i></i><i> suffix</i><i> cgihandler</i>]
-[<b>-</b><b>I</b><i></i><i> port</i>]
-[<b>-</b><b>M</b><i></i><i> suffix</i><i> type</i><i> encoding</i><i> encoding11</i>]
-[<b>-</b><b>S</b><i></i><i> server_software</i>]
-[<b>-</b><b>c</b><i></i><i> cgibin</i>]
-[<b>-</b><b>i</b><i></i><i> address</i>]
-[<b>-</b><b>p</b><i></i><i> pubdir</i>]
-[<b>-</b><b>t</b><i></i><i> chrootdir</i>]
-[<b>-</b><b>v</b><i></i><i> virtualroot</i>]
-[<b>-</b><b>x</b><i></i><i> index</i>]
-[<b>-</b><b>Z</b><i></i><i> cert</i><i> privkey</i>]
-<i></i><i>slashdir</i>
-[<i></i><i>myname</i>]
- <h3 id="DESCRIPTION">
- DESCRIPTION
- </h3>
-The
-<b>bozohttpd</b>
-program reads a
-<em></em><em>HTTP</em>
-request from the standard input, and sends a reply to the standard output.
-Besides ~user translation and virtual hosting support (see below), all file
-requests are from
-<i></i><i>slashdir</i>
-directory.
-The server uses
-<i></i><i>myname</i>
-as its name, which defaults to the local hostname, obtained from
-<a href="../html3/gethostname.html">gethostname(3)</a>
-(but see the
-<b>-</b><b>v</b>
-option for virtual hosting.)
-<b>bozohttpd</b>
-writes logs to
-<a href="../html3/syslog.html">syslog(3)</a>
-using the ftp facaility (but see the
-<b>-</b><b>s</b>
-option for testing.)
-<b>bozohttpd</b>
-is designed to be small, simple and relatively featureless,
-hopefully increasing its security.
- <h4 id="OPTIONS">
- OPTIONS
- </h4>
-The following options are available:
-<dl compact>
-<p><dt><b>-</b><b>b</b><dd>
-This option enables daemon mode, where
-<b>bozohttpd</b>
-detaches from the current terminal, running in the background and
-servicing HTTP requests.
-<p><dt><b>-</b><b>C</b><i></i><i> suffix</i><i> cgihandler</i><dd>
-This option adds a new CGI handler program for a particular file type.
-The
-<i></i><i>suffix</i>
-should be any normal file suffix, and the
-<i></i><i>cgihandler</i>
-should be a full path to an interpreter.
-This option is the only way to enable CGI programs that exist
-outside of the cgibin directory to be executed.
-Multiple
-<b>-</b><b>C</b>
-options may be passed.
-<p><dt><b>-</b><b>c</b><i></i><i> cgibin</i><dd>
-This option enables the CGI/1.1 interface.
-The
-<i></i><i>cgibin</i>
-directory is expected to contain the CGI programs to be used.
-<b>bozohttpd</b>
-looks for URL's in the form of
-<em></em><em>/cgi-bin/<scriptname></em>
-where
-<scriptname>
-is a valid CGI program in the
-<i></i><i>cgibin</i>
-directory.
-In other words, all CGI URL's must begin with
-<em></em><em>/cgi-bin/</em>.
-Note that the CGI/1.1 interface is not available with
-<em></em><em>~user</em>
-translation.
-<p><dt><b>-</b><b>e</b><dd>
-This option causes
-<b>bozohttpd</b>
-to not clear the environment when used with either the
-<b>-</b><b>t</b>
-or
-<b>-</b><b>U</b>
-options.
-<p><dt><b>-</b><b>f</b><dd>
-This option stops the
-<b>-</b><b>b</b>
-flag from
-<b>bozohttpd</b>
-detaching from the tty and going into the background.
-<p><dt><b>-</b><b>H</b><dd>
-This option causes directory index mode to hide files and directories
-that start with a period, except for
-<code></code><code>..</code>.
-Also see
-<b>-</b><b>X</b>.
-<p><dt><b>-</b><b>I</b><i></i><i> port</i><dd>
-This option is only valid with the
-<b>-</b><b>b</b>
-option.
-It causes
Home |
Main Index |
Thread Index |
Old Index