diff --git a/letsencrypt-apache/letsencrypt_apache/httpd.aug b/letsencrypt-apache/letsencrypt_apache/httpd.aug index 9b50a8f0e..caea9b67c 100644 --- a/letsencrypt-apache/letsencrypt_apache/httpd.aug +++ b/letsencrypt-apache/letsencrypt_apache/httpd.aug @@ -59,24 +59,17 @@ let empty = Util.empty_dos let indent = Util.indent (* borrowed from shellvars.aug *) -let char_arg_dir = /[^\\ '"\t\r\n]|\\\\"|\\\\'/ +let char_arg_dir = /[^ '"\t\r\n]|\\\\"|\\\\'/ let char_arg_sec = /[^ '"\t\r\n>]|\\\\"|\\\\'/ -let cdot = /\\\\./ -let cl = /\\\\\n/ -let dquot = - let no_dquot = /[^"\\\r\n]/ - in /"/ . (no_dquot|cdot|cl)* . /"/ -let squot = - let no_squot = /[^'\\\r\n]/ - in /'/ . (no_squot|cdot|cl)* . /'/ -let comp = /[<>=]?=/ +let dquot = /"([^"\\\r\n]|\\\\.)*"/ +let squot = /'([^'\\\r\n]|\\\\.)*'/ (****************************************************************** * Attributes *****************************************************************) let arg_dir = [ label "arg" . store (char_arg_dir+|dquot|squot) ] -let arg_sec = [ label "arg" . store (char_arg_sec+|comp|dquot|squot) ] +let arg_sec = [ label "arg" . store (char_arg_sec+|dquot|squot) ] let argv (l:lens) = l . (sep_spc . l)* @@ -84,16 +77,13 @@ let directive = [ indent . label "directive" . store word . (sep_spc . argv arg_dir)? . eol ] let section (body:lens) = - (* opt_eol includes empty lines *) - let opt_eol = del /([ \t]*#?\r?\n)*/ "\n" in let inner = (sep_spc . argv arg_sec)? . sep_osp . - dels ">" . opt_eol . ((body|comment) . (body|empty|comment)*)? . - indent . dels "" . eol . body* . indent . dels "" ">" . eol ] -let rec content = section (content|directive) +let rec content = section (content|directive|comment|empty) let lns = (content|directive|comment|empty)* @@ -101,7 +91,6 @@ let filter = (incl "/etc/apache2/apache2.conf") . (incl "/etc/apache2/httpd.conf") . (incl "/etc/apache2/ports.conf") . (incl "/etc/apache2/conf.d/*") . - (incl "/etc/apache2/conf-available/*.conf") . (incl "/etc/apache2/mods-available/*") . (incl "/etc/apache2/sites-available/*") . (incl "/etc/httpd/conf.d/*.conf") .