diff options
| author | mbalmer <mbalmer@NetBSD.org> | 2013-10-12 07:49:40 +0000 |
|---|---|---|
| committer | mbalmer <mbalmer@NetBSD.org> | 2013-10-12 07:49:40 +0000 |
| commit | 324e3bd114cd36c21a8fea5cbca2d726c87bd032 (patch) | |
| tree | 1c399a71bdb22c96d49fd4af91c1d9c0fd93e7db /libexec/httpd | |
| parent | 767a4f8ef04c37b64d616f671a551cbf07a09cc3 (diff) | |
remove trailing whitespace
Diffstat (limited to 'libexec/httpd')
| -rw-r--r-- | libexec/httpd/Makefile | 6 | ||||
| -rw-r--r-- | libexec/httpd/bozohttpd.c | 24 | ||||
| -rw-r--r-- | libexec/httpd/bozohttpd.h | 6 |
3 files changed, 18 insertions, 18 deletions
diff --git a/libexec/httpd/Makefile b/libexec/httpd/Makefile index d8e99150620..eeb8f933f30 100644 --- a/libexec/httpd/Makefile +++ b/libexec/httpd/Makefile @@ -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) > $@ diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c index 5178e7ed35d..62938365081 100644 --- a/libexec/httpd/bozohttpd.c +++ b/libexec/httpd/bozohttpd.c @@ -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, const char *url) 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 *request, int *isindex) #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 *request, int *isindex) */ /* - * 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 *request) (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, const char *fmt, ...) { va_list ap; int savederrno; - + /* only log if the level is low enough */ if (httpd->debug < level) return; diff --git a/libexec/httpd/bozohttpd.h b/libexec/httpd/bozohttpd.h index 6e28bc78c8e..8f08d9c74ca 100644 --- a/libexec/httpd/bozohttpd.h +++ b/libexec/httpd/bozohttpd.h @@ -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 *, ...) |
