Allow to inclue the types section anywhere in the configuration file.
authorreyk <reyk@openbsd.org>
Sat, 9 Aug 2014 07:35:45 +0000 (07:35 +0000)
committerreyk <reyk@openbsd.org>
Sat, 9 Aug 2014 07:35:45 +0000 (07:35 +0000)
Found by chris@
OK doug@

usr.sbin/httpd/parse.y

index 9a1e122..d66f207 100644 (file)
@@ -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 <reyk@openbsd.org>
@@ -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;