From 6468868fee132f062133ad9a1d373ef213e689f1 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Thu, 7 Apr 2022 16:15:55 +0000 Subject: [PATCH] print a deprecation message for the map rule --- parse.y | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index a71291a..d28195a 100644 --- a/parse.y +++ b/parse.y @@ -218,10 +218,15 @@ option : CHROOT string { conf.chroot = $2; } | MIME STRING string { yywarn("`mime MIME EXT' is deprecated and will be " "removed in a future version, please use the new " - "syntax: `map MIME to-ext EXT'"); + "`types' block."); add_mime(&conf.mime, $2, $3); } - | MAP string TOEXT string { add_mime(&conf.mime, $2, $4); } + | MAP string TOEXT string { + yywarn("`map mime to-ext' is deprecated and will be " + "removed in a future version, please use the new " + "`types' block."); + add_mime(&conf.mime, $2, $4); + } | PORT NUM { conf.port = check_port_num($2); } | PREFORK NUM { conf.prefork = check_prefork_num($2); } | PROTOCOLS string {