aboutsummaryrefslogtreecommitdiff
path: root/httpd/config.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@esdenera.com>2015-07-18 08:01:10 +0200
committerReyk Floeter <reyk@esdenera.com>2015-07-18 08:01:10 +0200
commit0349dc0e6b211145485e58fd19b83b9c9ce9f2e3 (patch)
tree80794f8df0297abad1f21e7e51d8d77e23dd0adf /httpd/config.c
parent5dc740393735eab283589d7414bee9425519f710 (diff)
downloadhttpd-0349dc0e6b211145485e58fd19b83b9c9ce9f2e3.tar.gz
httpd-0349dc0e6b211145485e58fd19b83b9c9ce9f2e3.zip
sync; add HSTS and default type
Diffstat (limited to 'httpd/config.c')
-rw-r--r--httpd/config.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/httpd/config.c b/httpd/config.c
index 3c88990..2829bed 100644
--- a/httpd/config.c
+++ b/httpd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.39 2015/07/15 16:00:39 jsing Exp $ */
+/* $OpenBSD: config.c,v 1.41 2015/07/18 06:00:43 reyk Exp $ */
/*
* Copyright (c) 2011 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -436,6 +436,18 @@ config_getserver_config(struct httpd *env, struct server *srv,
goto fail;
}
+ f = SRVFLAG_DEFAULT_TYPE;
+ if ((srv_conf->flags & f) == 0) {
+ srv_conf->flags |= parent->flags & f;
+ memcpy(&srv_conf->default_type,
+ &parent->default_type, sizeof(struct media_type));
+ }
+
+ f = SRVFLAG_SERVER_HSTS;
+ srv_conf->flags |= parent->flags & f;
+ srv_conf->hsts_max_age = parent->hsts_max_age;
+ srv_conf->hsts_subdomains = parent->hsts_subdomains;
+
memcpy(&srv_conf->timeout, &parent->timeout,
sizeof(srv_conf->timeout));
srv_conf->maxrequests = parent->maxrequests;