summaryrefslogtreecommitdiffstats
path: root/usr.sbin/httpd/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/httpd/config.c')
-rw-r--r--usr.sbin/httpd/config.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/httpd/config.c b/usr.sbin/httpd/config.c
index 046e63cedfc..2829bed563f 100644
--- a/usr.sbin/httpd/config.c
+++ b/usr.sbin/httpd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.40 2015/07/18 05:41:18 florian 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,13 @@ 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;