summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2015-07-16 19:05:29 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2015-07-16 19:05:29 +0000
commit687ca51947983a11ff261618378fa1446fbee3e8 (patch)
tree64acb2f033a40176c966db48ca5ab72abda72e18 /usr.sbin
parentb23322ff3ad6c3afcffa90c7312623eb086e174c (diff)
spacing
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/httpd/parse.y5
-rw-r--r--usr.sbin/httpd/server_file.c38
-rw-r--r--usr.sbin/httpd/server_http.c10
3 files changed, 27 insertions, 26 deletions
diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y
index 0353d7703a2..0870819c9e6 100644
--- a/usr.sbin/httpd/parse.y
+++ b/usr.sbin/httpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.69 2015/07/15 17:14:50 jsing Exp $ */
+/* $OpenBSD: parse.y,v 1.70 2015/07/16 19:05:28 reyk Exp $ */
/*
* Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -409,7 +409,8 @@ serveroptsl : LISTEN ON STRING opttls port {
if (alias != NULL) {
/* IP-based; use name match flags from parent */
alias->flags &= ~SRVFLAG_SERVER_MATCH;
- alias->flags |= srv->srv_conf.flags & SRVFLAG_SERVER_MATCH;
+ alias->flags |= srv->srv_conf.flags &
+ SRVFLAG_SERVER_MATCH;
TAILQ_INSERT_TAIL(&srv->srv_hosts,
alias, entry);
}
diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c
index 52e50ffb95f..16b47d06cba 100644
--- a/usr.sbin/httpd/server_file.c
+++ b/usr.sbin/httpd/server_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server_file.c,v 1.54 2015/05/05 11:10:13 florian Exp $ */
+/* $OpenBSD: server_file.c,v 1.55 2015/07/16 19:05:28 reyk Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -43,20 +43,20 @@ struct range {
off_t end;
};
-int server_file_access(struct httpd *, struct client *,
+int server_file_access(struct httpd *, struct client *,
char *, size_t);
-int server_file_request(struct httpd *, struct client *,
+int server_file_request(struct httpd *, struct client *,
char *, struct stat *);
-int server_partial_file_request(struct httpd *, struct client *,
+int server_partial_file_request(struct httpd *, struct client *,
char *, struct stat *, char *);
-int server_file_index(struct httpd *, struct client *,
+int server_file_index(struct httpd *, struct client *,
struct stat *);
int server_file_modified_since(struct http_descriptor *,
struct stat *);
-int server_file_method(struct client *);
-int parse_range_spec(char *, size_t, struct range *);
-struct range *parse_range(char *, size_t, int *);
-int buffer_add_range(int, struct evbuffer *, struct range *);
+int server_file_method(struct client *);
+int parse_range_spec(char *, size_t, struct range *);
+struct range *parse_range(char *, size_t, int *);
+int buffer_add_range(int, struct evbuffer *, struct range *);
int
server_file_access(struct httpd *env, struct client *clt,
@@ -296,9 +296,9 @@ server_partial_file_request(struct httpd *env, struct client *clt, char *path,
struct range *range;
struct evbuffer *evb = NULL;
size_t content_length;
- int code = 500, fd = -1, i, nranges, ret;
+ int code = 500, fd = -1, i, nranges, ret;
uint32_t boundary;
- char content_range[64];
+ char content_range[64];
const char *errstr = NULL;
/* Ignore range request for methods other than GET */
@@ -325,7 +325,7 @@ server_partial_file_request(struct httpd *env, struct client *clt, char *path,
if (nranges == 1) {
(void)snprintf(content_range, sizeof(content_range),
- "bytes %lld-%lld/%lld", range->start, range->end,
+ "bytes %lld-%lld/%lld", range->start, range->end,
st->st_size);
if (kv_add(&resp->http_headers, "Content-Range",
content_range) == NULL)
@@ -347,8 +347,8 @@ server_partial_file_request(struct httpd *env, struct client *clt, char *path,
content_length += i;
if ((i = evbuffer_add_printf(evb,
"Content-Type: %s/%s\r\n",
- media == NULL ? "application" : media->media_type,
- media == NULL ?
+ media == NULL ? "application" : media->media_type,
+ media == NULL ?
"octet-stream" : media->media_subtype)) == -1)
goto abort;
@@ -374,10 +374,10 @@ server_partial_file_request(struct httpd *env, struct client *clt, char *path,
/* prepare multipart/byteranges media type */
(void)strlcpy(multipart_media.media_type, "multipart",
- sizeof(multipart_media.media_type));
+ sizeof(multipart_media.media_type));
(void)snprintf(multipart_media.media_subtype,
- sizeof(multipart_media.media_subtype),
- "byteranges; boundary=%ud", boundary);
+ sizeof(multipart_media.media_subtype),
+ "byteranges; boundary=%ud", boundary);
media = &multipart_media;
}
@@ -656,7 +656,7 @@ struct range *
parse_range(char *str, size_t file_sz, int *nranges)
{
static struct range ranges[MAX_RANGES];
- int i = 0;
+ int i = 0;
char *p, *q;
/* Extract range unit */
@@ -692,7 +692,7 @@ parse_range(char *str, size_t file_sz, int *nranges)
int
parse_range_spec(char *str, size_t size, struct range *r)
{
- size_t start_str_len, end_str_len;
+ size_t start_str_len, end_str_len;
char *p, *start_str, *end_str;
const char *errstr;
diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c
index f3c338862b4..9a6609e58f7 100644
--- a/usr.sbin/httpd/server_http.c
+++ b/usr.sbin/httpd/server_http.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server_http.c,v 1.88 2015/07/15 23:16:38 reyk Exp $ */
+/* $OpenBSD: server_http.c,v 1.89 2015/07/16 19:05:28 reyk Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -1008,7 +1008,7 @@ server_expand_http(struct client *clt, const char *val, char *buf,
return (NULL);
}
if (strstr(val, "$SERVER_NAME") != NULL) {
- if ((str = url_encode(srv_conf->name))
+ if ((str = url_encode(srv_conf->name))
== NULL)
return (NULL);
ret = expand_string(buf, len, "$SERVER_NAME", str);
@@ -1539,7 +1539,7 @@ server_log_http(struct client *clt, u_int code, size_t len)
code, len,
referrer == NULL ? "" : referrer_v,
agent == NULL ? "" : agent_v);
-
+
break;
case LOG_FORMAT_CONNECTION:
@@ -1549,8 +1549,8 @@ server_log_http(struct client *clt, u_int code, size_t len)
goto done;
ret = evbuffer_add_printf(clt->clt_log, " [%s]",
- desc->http_path == NULL ? "" : path);
-
+ desc->http_path == NULL ? "" : path);
+
break;
}