summaryrefslogtreecommitdiff
path: root/libexec/httpd
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2008-03-03 22:15:08 +0000
committermrg <mrg@NetBSD.org>2008-03-03 22:15:08 +0000
commit707281a285f84f1d7c33d06a009d4abcb6529d32 (patch)
tree11f800c6dc08b0d038a93c1c3be91805537e68fb /libexec/httpd
parente1e74f372d4580af0ad34c25f04bfd9fa29bb82c (diff)
merge bozohttpd 20080303
Diffstat (limited to 'libexec/httpd')
-rw-r--r--libexec/httpd/auth-bozo.c6
-rw-r--r--libexec/httpd/bozohttpd.855
-rw-r--r--libexec/httpd/bozohttpd.c125
-rw-r--r--libexec/httpd/bozohttpd.h20
-rw-r--r--libexec/httpd/cgi-bozo.c15
-rw-r--r--libexec/httpd/content-bozo.c6
-rw-r--r--libexec/httpd/daemon-bozo.c6
-rw-r--r--libexec/httpd/dir-index-bozo.c10
-rw-r--r--libexec/httpd/ssl-bozo.c6
-rw-r--r--libexec/httpd/tilde-luzah-bozo.c6
10 files changed, 179 insertions, 76 deletions
diff --git a/libexec/httpd/auth-bozo.c b/libexec/httpd/auth-bozo.c
index f9857f03ea9..a2ac718d22f 100644
--- a/libexec/httpd/auth-bozo.c
+++ b/libexec/httpd/auth-bozo.c
@@ -1,9 +1,9 @@
-/* $NetBSD: auth-bozo.c,v 1.3 2007/10/17 18:47:59 tls Exp $ */
+/* $NetBSD: auth-bozo.c,v 1.4 2008/03/03 22:15:08 mrg Exp $ */
-/* $eterna: auth-bozo.c,v 1.7 2006/05/17 08:19:10 mrg Exp $ */
+/* $eterna: auth-bozo.c,v 1.8 2008/03/03 03:36:11 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/libexec/httpd/bozohttpd.8 b/libexec/httpd/bozohttpd.8
index 635fb68b7ef..3259b7e20b3 100644
--- a/libexec/httpd/bozohttpd.8
+++ b/libexec/httpd/bozohttpd.8
@@ -1,8 +1,8 @@
-.\" $NetBSD: bozohttpd.8,v 1.3 2008/03/03 03:10:53 mrg Exp $
+.\" $NetBSD: bozohttpd.8,v 1.4 2008/03/03 22:15:08 mrg Exp $
.\"
-.\" $eterna: bozohttpd.8,v 1.74 2006/05/17 08:19:10 mrg Exp $
+.\" $eterna: bozohttpd.8,v 1.78 2008/03/03 03:36:11 mrg Exp $
.\"
-.\" Copyright (c) 1997-2006 Matthew R. Green
+.\" Copyright (c) 1997-2008 Matthew R. Green
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 17, 2007
+.Dd March 3, 2008
.Dt HTTPD 8
.Sh NAME
.Nm httpd
@@ -77,7 +77,7 @@ This option enables daemon mode, where
detaches from the current terminal, running in the background and
servicing HTTP requests.
.It Fl C Ar suffix cgihandler
-This option adds a new CGI handler program for a particularly file type.
+This option adds a new CGI handler program for a particular file type.
The
.Ar suffix
should be any normal file suffix, and the
@@ -253,7 +253,9 @@ to
.Ar index .
.It Fl Z Ar certificate_path privatekey_path
This option sets the path to the server certificate file and the private key file
-in pem format. It also causes httpd to start SSL mode.
+in pem format. It also causes
+.Nm
+to start SSL mode.
.El
.Pp
Note that in
@@ -331,13 +333,9 @@ This server supports the
.Em HTTP/1.0
and
.Em HTTP/1.1
-standards. The
-.Em HTTP/1.1
-support is based on the Internet Draft
-.Dq draft-ietf-http-v11-spec-rev-06 ,
-which has been replaced by RFC 2616 as the standard.
-Support for these
-protocols is very minimal and many optional features are not supported.
+standards.
+Support for these protocols is very minimal and many optional features are
+not supported.
.Pp
.Nm
can be compiled without CGI support (NO_CGIBIN_SUPPORT), user
@@ -377,6 +375,20 @@ On
the
.Xr pwhash 1
utility may be used to generate hashed passwords.
+.Pp
+While
+.Nm
+distributed with
+.Nx
+has support for HTTP Basic Authorisation enabled by default,
+the portable distribution it is excluded.
+Compile
+.Nm
+with
+.Dq -DDO_HTPASSWD
+on the compiler command line to enable this support. It may require
+linking with the crypt library, using
+.Dq -lcrypt .
.Sh FILES
.Nm
looks for a couple of special files in directories that allow certain features
@@ -432,6 +444,9 @@ as
.Nm .
The focus has always been simplicity and security, with minimal features
and regular code audits.
+This manual documents
+.Nm
+version 20080303.
.Sh AUTHORS
.Nm
was written by Matthew R. Green
@@ -440,6 +455,14 @@ was written by Matthew R. Green
The large list of contributors includes:
.Bl -dash
.It
+Arnaud Lacombe
+.Aq alc@netbs.dorg
+provided some clean up for memory leaks
+.It
+Christoph Badura
+.Aq bad@bsd.de
+provided Range: header support
+.It
Julian Coleman
.Aq jdc@coris.org.uk
provided an IPv6 bugfix
@@ -489,13 +512,17 @@ Luke Mewburn
provided many various fixes, including cgi-bin fixes & enhancements,
HTTP basic authorisation support and much code clean up
.It
+Jeremey Reed
+.Aq reed@netbsd.org
+provided several clean up fixes, and man page updates
+.It
Scott Reynolds
.Aq scottr@netbsd.org
provided various fixes
.It
Tyler Retzlaff
.Aq rtr@eterna.com.au
-provided SSL support, cgi-bin fixes and random other stuff
+provided SSL support, cgi-bin fixes and much other random other stuff
.It
Steve Rumble
.Aq rumble@ephemeral.org
diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c
index 8160688e3d5..4d2e567eb2c 100644
--- a/libexec/httpd/bozohttpd.c
+++ b/libexec/httpd/bozohttpd.c
@@ -1,9 +1,9 @@
-/* $NetBSD: bozohttpd.c,v 1.5 2007/12/16 02:38:24 perry Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.6 2008/03/03 22:15:08 mrg Exp $ */
-/* $eterna: bozohttpd.c,v 1.137 2006/05/17 08:37:36 mrg Exp $ */
+/* $eterna: bozohttpd.c,v 1.142 2008/03/03 03:36:11 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -96,6 +96,7 @@
*
* - 14.5/14.16/14.35: we don't do ranges. from section 14.35.2
* `A server MAY ignore the Range header'. but it might be nice.
+ * since 20080301 we support simple range headers.
*
* - 14.9: we aren't a cache.
*
@@ -110,7 +111,7 @@
#define INDEX_HTML "index.html"
#endif
#ifndef SERVER_SOFTWARE
-#define SERVER_SOFTWARE "bozohttpd/20060517"
+#define SERVER_SOFTWARE "bozohttpd/20080303"
#endif
#ifndef DIRECT_ACCESS_FILE
#define DIRECT_ACCESS_FILE ".bzdirect"
@@ -374,6 +375,8 @@ main(int argc, char **argv)
break;
#else /* NO_DAEMON_MODE */
case 'b':
+ case 'e':
+ case 'f':
case 'i':
case 'I':
error(1, "Daemon mode is not enabled");
@@ -425,8 +428,9 @@ main(int argc, char **argv)
uflag = 1;
break;
#else
- case 'u':
case 'p':
+ case 't':
+ case 'u':
error(1, "User support is not enabled");
/* NOTREACHED */
#endif /* NO_USER_SUPPORT */
@@ -563,13 +567,13 @@ parse_request(char *in, char **method, char **url, char **proto)
*method = *url = *proto = NULL; /* set them up */
len = (ssize_t)strlen(in);
- val = strnsep(&in, " \t\n\r", &len);
+ val = bozostrnsep(&in, " \t\n\r", &len);
if (len < 1 || val == NULL)
return;
*method = val;
while (*in == ' ' || *in == '\t')
in++;
- val = strnsep(&in, " \t\n\r", &len);
+ val = bozostrnsep(&in, " \t\n\r", &len);
if (len < 1) {
if (len == 0)
*url = val;
@@ -625,6 +629,8 @@ read_request(void)
memset(request, 0, sizeof *request);
request->hr_allow = request->hr_host = NULL;
request->hr_content_type = request->hr_content_length = NULL;
+ request->hr_range = NULL;
+ request->hr_last_byte_pos = -1;
slen = sizeof(ss);
if (getpeername(0, (struct sockaddr *)&ss, &slen) < 0)
@@ -668,7 +674,7 @@ read_request(void)
sigaction(SIGALRM, &sa, NULL); /* XXX */
alarm(MAX_WAIT_TIME);
- while ((str = dgetln(STDIN_FILENO, &len, bozoread)) != NULL) {
+ while ((str = bozodgetln(STDIN_FILENO, &len, bozoread)) != NULL) {
alarm(0);
if (alarmhit)
http_error(408, NULL, "request timed out");
@@ -709,14 +715,16 @@ read_request(void)
if (*str == '\0')
break;
- val = strnsep(&str, ":", &len);
+ val = bozostrnsep(&str, ":", &len);
debug((DEBUG_EXPLODING,
- "read_req2: after strnsep: str ``%s'' val ``%s''",
+ "read_req2: after bozostrnsep: str ``%s'' val ``%s''",
str, val));
if (val == NULL || len == -1)
http_error(404, request, "no header");
while (*str == ' ' || *str == '\t')
len--, str++;
+ while (*val == ' ' || *val == '\t')
+ val++;
if (auth_check_headers(request, val, str, len))
goto next_header;
@@ -735,6 +743,8 @@ read_request(void)
else if (strcasecmp(hdr->h_header, "referrer") == 0 ||
strcasecmp(hdr->h_header, "referer") == 0)
request->hr_referrer = hdr->h_value;
+ else if (strcasecmp(hdr->h_header, "range") == 0)
+ request->hr_range = hdr->h_value;
debug((DEBUG_FAT, "adding header %s: %s",
hdr->h_header, hdr->h_value));
@@ -755,6 +765,34 @@ next_header:
if (request->hr_proto == http_11 && request->hr_host == NULL)
http_error(400, request, "missing Host header");
+ if (request->hr_range != NULL) {
+ debug((DEBUG_FAT, "hr_range: %s", request->hr_range));
+ /* support only simple ranges %d- and %d-%d */
+ if (strchr(request->hr_range, ',') == NULL) {
+ const char *rstart, *dash;
+
+ rstart = strchr(request->hr_range, '=');
+ if (rstart != NULL) {
+ rstart++;
+ dash = strchr(rstart, '-');
+ if (dash != NULL && dash != rstart) {
+ dash++;
+ request->hr_have_range = 1;
+ request->hr_first_byte_pos =
+ strtoll(rstart, NULL, 10);
+ if (request->hr_first_byte_pos < 0)
+ request->hr_first_byte_pos = 0;
+ if (*dash != '\0') {
+ request->hr_last_byte_pos =
+ strtoll(dash, NULL, 10);
+ if (request->hr_last_byte_pos < 0)
+ request->hr_last_byte_pos = -1;
+ }
+ }
+ }
+ }
+ }
+
debug((DEBUG_FAT, "read_request returns url %s in request", request->hr_url));
return (request);
}
@@ -847,7 +885,23 @@ process_request(http_req *request)
/* NOTREACHED */
/* XXX RFC1945 10.9 If-Modified-Since (http code 304) */
- bozoprintf("%s 200 OK\r\n", request->hr_proto);
+ /* validate requested range */
+ if (request->hr_last_byte_pos == -1 ||
+ request->hr_last_byte_pos >= sb.st_size)
+ request->hr_last_byte_pos = sb.st_size - 1;
+ if (request->hr_have_range &&
+ request->hr_first_byte_pos > request->hr_last_byte_pos) {
+ request->hr_have_range = 0; /* punt */
+ request->hr_first_byte_pos = 0;
+ request->hr_last_byte_pos = sb.st_size - 1;
+ }
+ debug((DEBUG_FAT, "have_range %d first_pos %qd last_pos %qd",
+ request->hr_have_range,
+ request->hr_first_byte_pos, request->hr_last_byte_pos));
+ if (request->hr_have_range)
+ bozoprintf("%s 206 Partial Content\r\n", request->hr_proto);
+ else
+ bozoprintf("%s 200 OK\r\n", request->hr_proto);
if (request->hr_proto != http_09) {
type = content_type(request, file);
@@ -861,10 +915,12 @@ process_request(http_req *request)
if (request->hr_method != HTTP_HEAD) {
char *addr;
void *oaddr;
- off_t sz = sb.st_size;
+ size_t mappedsz;
+ size_t sz;
- oaddr = addr = mmap(0, (size_t)sz, PROT_READ,
- MAP_SHARED, fd, 0);
+ sz = mappedsz = request->hr_last_byte_pos - request->hr_first_byte_pos + 1;
+ oaddr = addr = mmap(0, mappedsz, PROT_READ,
+ MAP_SHARED, fd, request->hr_first_byte_pos);
if (addr == (char *)-1)
error(1, "mmap failed: %s", strerror(errno));
@@ -874,12 +930,14 @@ process_request(http_req *request)
while (sz > WRSZ) {
if (bozowrite(STDOUT_FILENO, addr, WRSZ) != WRSZ)
error(1, "write failed: %s", strerror(errno));
+ debug((DEBUG_OBESE, "wrote %d bytes", WRSZ));
sz -= WRSZ;
addr += WRSZ;
}
if (sz && bozowrite(STDOUT_FILENO, addr, sz) != sz)
error(1, "final write failed: %s", strerror(errno));
- if (munmap(oaddr, (size_t)sb.st_size) < 0)
+ debug((DEBUG_OBESE, "wrote %d bytes", (int)sz));
+ if (munmap(oaddr, mappedsz) < 0)
warning("munmap failed");
}
/* If SSL enabled cleanup SSL structure. */
@@ -1260,8 +1318,11 @@ void
print_header(http_req *request, struct stat *sbp, const char *type,
const char *encoding)
{
+ off_t len;
+
bozoprintf("Date: %s\r\n", http_date());
bozoprintf("Server: %s\r\n", server_software);
+ bozoprintf("Accept-Ranges: bytes\r\n");
if (sbp) {
char filedate[40];
struct tm *tm;
@@ -1275,8 +1336,18 @@ print_header(http_req *request, struct stat *sbp, const char *type,
bozoprintf("Content-Type: %s\r\n", type);
if (encoding && *encoding)
bozoprintf("Content-Encoding: %s\r\n", encoding);
- if (sbp)
- bozoprintf("Content-Length: %qd\r\n", (long long)sbp->st_size);
+ if (sbp) {
+ if (request->hr_have_range) {
+ len = request->hr_last_byte_pos - request->hr_first_byte_pos +1;
+ bozoprintf("Content-Range: bytes %qd-%qd/%qd\r\n",
+ (long long) request->hr_first_byte_pos,
+ (long long) request->hr_last_byte_pos,
+ (long long) sbp->st_size);
+ }
+ else
+ len = sbp->st_size;
+ bozoprintf("Content-Length: %qd\r\n", (long long)len);
+ }
if (request && request->hr_proto == http_11)
bozoprintf("Connection: close\r\n");
bozoflush(stdout);
@@ -1334,7 +1405,7 @@ escape_html(http_req *request)
tmp[j] = 0;
/*
- * XXX original "url" is a substring of an allocation, so we
+ * original "url" is a substring of an allocation, so we
* can't touch it. so, ignore it and replace the request.
*/
request->hr_url = tmp;
@@ -1553,7 +1624,8 @@ http_error(int code, http_req *request, const char *msg)
error(1, "http_error() failed (short = %p, long = %p)",
header, reason);
- if (request && request->hr_serverport && strcmp(request->hr_serverport, "80") != 0)
+ if (request && request->hr_serverport &&
+ strcmp(request->hr_serverport, "80") != 0)
snprintf(portbuf, sizeof(portbuf), ":%s", request->hr_serverport);
else
portbuf[0] = '\0';
@@ -1597,7 +1669,7 @@ static struct errors_map {
} errors_map[] = {
{ 400, "400 Bad Request", "The request was not valid", },
{ 401, "401 Unauthorized", "No authorization", },
- { 403, "403 Forbidden", "Access to this item has been denied", },
+ { 403, "403 Forbidden", "Access to this item has been denied",},
{ 404, "404 Not Found", "This item has not been found", },
{ 408, "408 Request Timeout", "This request took too long", },
{ 417, "417 Expectation Failed","Expectations not available", },
@@ -1638,7 +1710,7 @@ http_errors_long(int code)
* correctly passed in.
*/
char *
-strnsep(char **strp, const char *delim, ssize_t *lenp)
+bozostrnsep(char **strp, const char *delim, ssize_t *lenp)
{
char *s;
const char *spanp;
@@ -1672,7 +1744,7 @@ strnsep(char **strp, const char *delim, ssize_t *lenp)
* terminate the string.
*/
char *
-dgetln(int fd, ssize_t *lenp, ssize_t (*readfn)(int, void *, size_t))
+bozodgetln(int fd, ssize_t *lenp, ssize_t (*readfn)(int, void *, size_t))
{
static char *buffer;
static ssize_t buflen = 0;
@@ -1698,12 +1770,12 @@ dgetln(int fd, ssize_t *lenp, ssize_t (*readfn)(int, void *, size_t))
* the program
*/
for (; readfn(fd, &c, 1) == 1; ) {
- debug((DEBUG_EXPLODING, "dgetln read %c", c));
+ debug((DEBUG_EXPLODING, "bozodgetln read %c", c));
if (len >= buflen - 1) {
buflen *= 2;
- debug((DEBUG_EXPLODING,
- "dgetln: reallocating buffer to buflen %d", buflen));
+ debug((DEBUG_EXPLODING, "bozodgetln: "
+ "reallocating buffer to buflen %zu", buflen));
nbuffer = realloc(buffer, buflen);
if (nbuffer == NULL) {
free(buffer);
@@ -1735,7 +1807,8 @@ dgetln(int fd, ssize_t *lenp, ssize_t (*readfn)(int, void *, size_t))
}
buffer[len] = '\0';
- debug((DEBUG_OBESE, "dgetln returns: ``%s'' with len %d", buffer, len));
+ debug((DEBUG_OBESE, "bozodgetln returns: ``%s'' with len %d",
+ buffer, len));
*lenp = len;
return (buffer);
}
diff --git a/libexec/httpd/bozohttpd.h b/libexec/httpd/bozohttpd.h
index d7da069067a..2be3a50dd87 100644
--- a/libexec/httpd/bozohttpd.h
+++ b/libexec/httpd/bozohttpd.h
@@ -1,9 +1,9 @@
-/* $NetBSD: bozohttpd.h,v 1.4 2007/11/04 15:20:11 rtr Exp $ */
+/* $NetBSD: bozohttpd.h,v 1.5 2008/03/03 22:15:08 mrg Exp $ */
-/* $eterna: bozohttpd.h,v 1.13 2006/05/17 08:19:10 mrg Exp $ */
+/* $eterna: bozohttpd.h,v 1.18 2008/03/03 03:36:11 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,6 +33,7 @@
*/
#include <sys/queue.h>
#include <sys/stat.h>
+
#include <stdio.h>
/* headers */
@@ -61,6 +62,10 @@ typedef struct {
const char *hr_allow;
const char *hr_host; /* HTTP/1.1 Host: */
const char *hr_referrer;
+ const char *hr_range;
+ int hr_have_range;
+ off_t hr_first_byte_pos;
+ off_t hr_last_byte_pos;
const char *hr_remotehost;
const char *hr_remoteaddr;
const char *hr_serverport;
@@ -108,14 +113,15 @@ void warning(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
void error(int, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
-void http_error(int, http_req *, const char *);
+void http_error(int, http_req *, const char *)
+ __attribute__((__noreturn__));
void check_special_files(http_req *, const char *);
char *http_date(void);
void print_header(http_req *, struct stat *, const char *, const char *);
-char *dgetln(int, ssize_t *, ssize_t (*)(int, void *, size_t));
-char *strnsep(char **, const char *, ssize_t *);
+char *bozodgetln(int, ssize_t *, ssize_t (*)(int, void *, size_t));
+char *bozostrnsep(char **, const char *, ssize_t *);
void *bozomalloc(size_t);
void *bozorealloc(void *, size_t);
@@ -200,8 +206,6 @@ extern int uflag;
extern const char *public_html;
char * user_transform(http_req *, int *);
-#else
-#define user_transform(a, b) /* nothing */
#endif /* NO_USER_SUPPORT */
diff --git a/libexec/httpd/cgi-bozo.c b/libexec/httpd/cgi-bozo.c
index 0f71e59c684..7434cc602dc 100644
--- a/libexec/httpd/cgi-bozo.c
+++ b/libexec/httpd/cgi-bozo.c
@@ -1,9 +1,9 @@
-/* $NetBSD: cgi-bozo.c,v 1.6 2007/11/04 15:20:12 rtr Exp $ */
+/* $NetBSD: cgi-bozo.c,v 1.7 2008/03/03 22:15:09 mrg Exp $ */
-/* $eterna: cgi-bozo.c,v 1.13 2006/05/17 08:19:10 mrg Exp $ */
+/* $eterna: cgi-bozo.c,v 1.18 2008/03/03 03:36:11 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -308,7 +308,7 @@ finish_cgi_output(http_req *request, int in, int nph)
{
char buf[WRSZ];
char *str;
- size_t len;
+ ssize_t len;
ssize_t rbytes;
SIMPLEQ_HEAD(, headers) headers;
struct headers *hdr;
@@ -317,10 +317,10 @@ finish_cgi_output(http_req *request, int in, int nph)
/* much of this code is like read_request()'s header loop. hmmm... */
SIMPLEQ_INIT(&headers);
write_header = nph == 0;
- while (nph == 0 && (str = dgetln(in, (ssize_t *)&len, read)) != NULL) {
+ while (nph == 0 && (str = bozodgetln(in, &len, read)) != NULL) {
char * hdr_name, * hdr_value;
- if (parse_header(str, (ssize_t)len, &hdr_name, &hdr_value))
+ if (parse_header(str, len, &hdr_name, &hdr_value))
break;
/*
@@ -365,6 +365,7 @@ finish_cgi_output(http_req *request, int in, int nph)
free(hdr->h_header);
free(hdr);
}
+ bozoprintf("\r\n");
bozoflush(stdout);
}
@@ -398,7 +399,7 @@ parse_header(const char * str, ssize_t len, char ** hdr_str, char ** hdr_val)
name = value = bozostrdup(str);
/* locate the ':' separator in the header/value */
- name = strnsep(&value, ":", &len);
+ name = bozostrnsep(&value, ":", &len);
if (NULL == name || -1 == len) {
free(name);
diff --git a/libexec/httpd/content-bozo.c b/libexec/httpd/content-bozo.c
index f4b6fa34d92..ca82a1ae37b 100644
--- a/libexec/httpd/content-bozo.c
+++ b/libexec/httpd/content-bozo.c
@@ -1,9 +1,9 @@
-/* $NetBSD: content-bozo.c,v 1.2 2007/10/17 18:48:00 tls Exp $ */
+/* $NetBSD: content-bozo.c,v 1.3 2008/03/03 22:15:09 mrg Exp $ */
-/* $eterna: content-bozo.c,v 1.8 2006/05/17 08:19:10 mrg Exp $ */
+/* $eterna: content-bozo.c,v 1.9 2008/03/03 03:36:11 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/libexec/httpd/daemon-bozo.c b/libexec/httpd/daemon-bozo.c
index 3cdac581ed0..c92c46ff5c6 100644
--- a/libexec/httpd/daemon-bozo.c
+++ b/libexec/httpd/daemon-bozo.c
@@ -1,9 +1,9 @@
-/* $NetBSD: daemon-bozo.c,v 1.2 2007/10/17 18:48:01 tls Exp $ */
+/* $NetBSD: daemon-bozo.c,v 1.3 2008/03/03 22:15:09 mrg Exp $ */
-/* $eterna: daemon-bozo.c,v 1.8 2006/05/17 08:22:03 mrg Exp $ */
+/* $eterna: daemon-bozo.c,v 1.9 2008/03/03 03:36:11 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/libexec/httpd/dir-index-bozo.c b/libexec/httpd/dir-index-bozo.c
index c3352148b84..18909d0f868 100644
--- a/libexec/httpd/dir-index-bozo.c
+++ b/libexec/httpd/dir-index-bozo.c
@@ -1,9 +1,9 @@
-/* $NetBSD: dir-index-bozo.c,v 1.3 2007/10/18 18:53:59 ad Exp $ */
+/* $NetBSD: dir-index-bozo.c,v 1.4 2008/03/03 22:15:09 mrg Exp $ */
-/* $eterna: dir-index-bozo.c,v 1.7 2006/05/17 08:18:44 mrg Exp $ */
+/* $eterna: dir-index-bozo.c,v 1.10 2008/03/03 03:36:11 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -70,8 +70,6 @@ directory_index(http_req *request, const char *dirname, int isindex)
char spacebuf[48];
int l, i;
- dp = NULL; /* XXX */
-
if (!isindex || !Xflag)
return 0;
@@ -181,7 +179,7 @@ directory_index(http_req *request, const char *dirname, int isindex)
closedir(dp);
bozoprintf("</pre>");
directory_hr();
- bozoprintf("</body></html>\r\n");
+ bozoprintf("</body></html>\r\n\r\n");
bozoflush(stdout);
return 1;
diff --git a/libexec/httpd/ssl-bozo.c b/libexec/httpd/ssl-bozo.c
index 0ae8304d333..32dac59e0a7 100644
--- a/libexec/httpd/ssl-bozo.c
+++ b/libexec/httpd/ssl-bozo.c
@@ -1,9 +1,9 @@
-/* $NetBSD: ssl-bozo.c,v 1.2 2007/10/17 18:48:01 tls Exp $ */
+/* $NetBSD: ssl-bozo.c,v 1.3 2008/03/03 22:15:09 mrg Exp $ */
-/* $eterna: ssl-bozo.c,v 1.6 2006/05/17 08:19:10 mrg Exp $ */
+/* $eterna: ssl-bozo.c,v 1.7 2008/03/03 03:36:12 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/libexec/httpd/tilde-luzah-bozo.c b/libexec/httpd/tilde-luzah-bozo.c
index e972d947828..40b8932716c 100644
--- a/libexec/httpd/tilde-luzah-bozo.c
+++ b/libexec/httpd/tilde-luzah-bozo.c
@@ -1,9 +1,9 @@
-/* $NetBSD: tilde-luzah-bozo.c,v 1.2 2007/10/17 18:48:02 tls Exp $ */
+/* $NetBSD: tilde-luzah-bozo.c,v 1.3 2008/03/03 22:15:09 mrg Exp $ */
-/* $eterna: tilde-luzah-bozo.c,v 1.4 2006/05/17 08:37:36 mrg Exp $ */
+/* $eterna: tilde-luzah-bozo.c,v 1.5 2008/03/03 03:36:12 mrg Exp $ */
/*
- * Copyright (c) 1997-2006 Matthew R. Green
+ * Copyright (c) 1997-2008 Matthew R. Green
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without