Module Name: src
Committed By: mbalmer
Date: Sat Oct 12 07:49:40 UTC 2013
Modified Files:
src/libexec/httpd: Makefile bozohttpd.c bozohttpd.h
Log Message:
remove trailing whitespace
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/libexec/httpd/Makefile
cvs rdiff -u -r1.41 -r1.42 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.28 -r1.29 src/libexec/httpd/bozohttpd.h
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/Makefile
diff -u src/libexec/httpd/Makefile:1.14 src/libexec/httpd/Makefile:1.15
--- src/libexec/httpd/Makefile:1.14 Thu Jul 11 08:51:09 2013
+++ src/libexec/httpd/Makefile Sat Oct 12 07:49:40 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2013/07/11 08:51:09 mrg Exp $
+# $NetBSD: Makefile,v 1.15 2013/10/12 07:49:40 mbalmer Exp $
#
# $eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
#
@@ -48,7 +48,7 @@ COPTS+= -DNO_SSL_SUPPORT
# Build release things.
#
NROFF?= nroff
-
+
PREHTMLFROB= sed \
-e 's/&/\&/' \
-e 's/</\</' \
@@ -64,7 +64,7 @@ TXTFROB= col -b
bozohttpd.8.html: bozohttpd.8
$(PREHTMLFROB) $> | $(NROFF) -mdoc2html | $(HTMLFROB) > $@
-
+
bozohttpd.8.txt: bozohttpd.8
$(NROFF) -mdoc -Tascii $> | $(TXTFROB) > $@
Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.41 src/libexec/httpd/bozohttpd.c:1.42
--- src/libexec/httpd/bozohttpd.c:1.41 Thu Jul 11 07:46:37 2013
+++ src/libexec/httpd/bozohttpd.c Sat Oct 12 07:49:40 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.c,v 1.41 2013/07/11 07:46:37 mrg Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.42 2013/10/12 07:49:40 mbalmer Exp $ */
/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
@@ -99,7 +99,7 @@
* - 14.9: we aren't a cache.
*
* - 14.15: content-md5 would be nice...
- *
+ *
* - 14.24/14.26/14.27: be nice to support this...
*
* - 14.44: not sure about this Vary: header. ignore it for now.
@@ -867,7 +867,7 @@ bozo_escape_rfc3986(bozohttpd_t *httpd,
buflen = len * 3 + 1;
buf = bozorealloc(httpd, buf, buflen);
}
-
+
if (url == NULL) {
buf[0] = 0;
return buf;
@@ -958,7 +958,7 @@ handle_redirect(bozo_httpreq_t *request,
char portbuf[20];
const char *hostname = BOZOHOST(httpd, request);
int query = 0;
-
+
if (url == NULL) {
if (asprintf(&urlbuf, "/%s/", request->hr_file) < 0)
bozo_err(httpd, 1, "asprintf");
@@ -981,7 +981,7 @@ handle_redirect(bozo_httpreq_t *request,
bozo_warn(httpd, "redirecting %s%s%s", hostname, portbuf, url);
debug((httpd, DEBUG_FAT, "redirecting %s", url));
bozo_printf(httpd, "%s 301 Document Moved\r\n", request->hr_proto);
- if (request->hr_proto != httpd->consts.http_09)
+ if (request->hr_proto != httpd->consts.http_09)
bozo_print_header(request, NULL, "text/html", NULL);
if (request->hr_proto != httpd->consts.http_09) {
bozo_printf(httpd, "Location: http://");
@@ -1230,7 +1230,7 @@ fix_url_percent(bozo_httpreq_t *request)
"percent hack was %2f (/)");
goto copy_rest;
}
-
+
buf[0] = *++s;
buf[1] = *++s;
buf[2] = '\0';
@@ -1267,7 +1267,7 @@ copy_rest:
* - punt if it doesn't start with /
* - check httpd->untrustedref / referrer
* - look for "http://myname/" and deal with it.
- * - maybe call bozo_process_cgi()
+ * - maybe call bozo_process_cgi()
* - check for ~user and call bozo_user_transform() if so
* - if the length > 1, check for trailing slash. if so,
* add the index.html file
@@ -1307,8 +1307,8 @@ transform_request(bozo_httpreq_t *reques
#define TOP_PAGE(x) (strcmp((x), "/") == 0 || \
strcmp((x) + 1, httpd->index_html) == 0 || \
- strcmp((x) + 1, "favicon.ico") == 0)
-
+ strcmp((x) + 1, "favicon.ico") == 0)
+
debug((httpd, DEBUG_EXPLODING, "checking httpd->untrustedref"));
/*
* first check that this path isn't allowed via .bzdirect file,
@@ -1403,7 +1403,7 @@ transform_request(bozo_httpreq_t *reques
*/
/*
- * stop traversing outside our domain
+ * stop traversing outside our domain
*
* XXX true security only comes from our parent using chroot(2)
* before execve(2)'ing us. or our own built in chroot(2) support.
@@ -1527,7 +1527,7 @@ bozo_process_request(bozo_httpreq_t *req
(void)bozo_http_error(httpd, 403, request,
"no permission to open file");
else if (errno == ENOENT) {
- if (!bozo_dir_index(request, file, isindex))
+ if (!bozo_dir_index(request, file, isindex))
(void)bozo_http_error(httpd, 404, request,
"no file");
} else
@@ -1690,7 +1690,7 @@ debug__(bozohttpd_t *httpd, int level, c
{
va_list ap;
int savederrno;
-
+
/* only log if the level is low enough */
if (httpd->debug < level)
return;
Index: src/libexec/httpd/bozohttpd.h
diff -u src/libexec/httpd/bozohttpd.h:1.28 src/libexec/httpd/bozohttpd.h:1.29
--- src/libexec/httpd/bozohttpd.h:1.28 Wed Sep 4 22:59:50 2013
+++ src/libexec/httpd/bozohttpd.h Sat Oct 12 07:49:40 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.h,v 1.28 2013/09/04 22:59:50 pooka Exp $ */
+/* $NetBSD: bozohttpd.h,v 1.29 2013/10/12 07:49:40 mbalmer Exp $ */
/* $eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $ */
@@ -121,7 +121,7 @@ typedef struct bozo_httpreq_t {
to hr_httpd->virthostname) */
char *hr_file;
char *hr_oldfile; /* if we added an index_html */
- char *hr_query;
+ char *hr_query;
const char *hr_proto;
const char *hr_content_type;
const char *hr_content_length;
@@ -184,7 +184,7 @@ typedef struct bozoprefs_t {
void debug__(bozohttpd_t *, int, const char *, ...) BOZO_PRINTFLIKE(3, 4);
#define debug(x) debug__ x
#else
-#define debug(x)
+#define debug(x)
#endif /* NO_DEBUG */
void bozo_warn(bozohttpd_t *, const char *, ...)