aboutsummaryrefslogtreecommitdiff
path: root/httpd/config.c
diff options
context:
space:
mode:
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;