From e1c7d5442ca1d3bd67c200d2dbd94bd0e40e72bd Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 Apr 2021 12:26:06 +0000 Subject: Use single hyphen for NULL value, allow the user to specify it This lets the user inject a footer without injecting a header. --- lib/Apache/Inject/Handler.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/Apache/Inject') diff --git a/lib/Apache/Inject/Handler.pm b/lib/Apache/Inject/Handler.pm index f9254fd..0e054e7 100644 --- a/lib/Apache/Inject/Handler.pm +++ b/lib/Apache/Inject/Handler.pm @@ -12,14 +12,14 @@ use Apache2::RequestUtil (); my $doc = qr{ \A (? \s* - (]*>)? \s* - (]*>)? \s* - ( ]*>.*? \s* + ( ]*> )? \s* + ( ]*> )? \s* + ( ]*> .*? \s* | ( ]*> \s* | ]*> \s* - | ]*>.*? \s* - | ]*>.*? \s* # n.b. - | ]*>.*? \s* # n.b. + | ]*> .*? \s* + | ]*> .*? \s* + | ]*> .*? \s* | ]*> \s* )+ )? @@ -57,7 +57,7 @@ sub inject { # Retrieve value implicitly set by Inject directive return if not (my $val = $r->dir_config($var)); - return if $val eq ' '; # special value signifying absence of argument + return if $val eq '-'; # special value signifying absence of argument # Validate path if ($val =~ m{^/}) { -- cgit v1.2.3