From a0774621e352bcd03e55502c98c3fd7be785e45e Mon Sep 17 00:00:00 2001 From: reyk Date: Sat, 9 Aug 2014 07:35:45 +0000 Subject: [PATCH] Allow to inclue the types section anywhere in the configuration file. Found by chris@ OK doug@ --- usr.sbin/httpd/parse.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y index 9a1e1221df5..d66f2077874 100644 --- a/usr.sbin/httpd/parse.y +++ b/usr.sbin/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.34 2014/08/06 20:29:54 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.35 2014/08/09 07:35:45 reyk Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter @@ -694,6 +694,9 @@ medianamesl : STRING { } free($1); + if (!loadcfg) + break; + if (media_add(conf->sc_mediatypes, &media) == NULL) { yyerror("failed to add media type"); YYERROR; -- 2.20.1