From: Jim Jagielski Date: Mon, 12 Jan 2015 13:59:57 +0000 (+0000) Subject: Merge r1648719 from trunk: X-Git-Tag: 2.4.11~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a194799a53f291b746918be41c5ed5fdff9479e;p=apache Merge r1648719 from trunk: split-logfile: Fix perl error: 'Can't use string ("example.org:80") as a symbol ref while "strict refs"'. PR 56329. Submitted By: Holger Mauermann Committed By: covener Submitted by: covener Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1651095 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 5cfa3c86a4..7741573010 100644 --- a/CHANGES +++ b/CHANGES @@ -21,6 +21,10 @@ Changes with Apache 2.4.11 request headers earlier. Adds "MergeTrailers" directive to restore legacy behavior. [Edward Lu, Yann Ylavic, Joe Orton, Eric Covener] + *) split-logfile: Fix perl error: 'Can't use string ("example.org:80") + as a symbol ref while "strict refs"'. PR 56329. + [Holger Mauermann ] + *) mod_proxy: Prevent ProxyPassReverse from doing a substitution when the URL parameter interpolates to an empty string. PR 56603. [] diff --git a/STATUS b/STATUS index 378d273fc2..d5bc41c85b 100644 --- a/STATUS +++ b/STATUS @@ -110,11 +110,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4.x patch: https://issues.apache.org/bugzilla/attachment.cgi?id=32209 +1: druggeri, gsmith, rjung - * split-logfile: Fix perl strict refs error PR56329. - trunk patch: 1648719 - 2.4.x patch: trunks works - +1 covener, rjung, jim - * mod_proxy_ajp: Fix get_content_length(). clength in request_rec is for response sizes, not request body size. It is initialized to 0, so the "if" branch was never taken. diff --git a/support/split-logfile.in b/support/split-logfile.in index 59eda713f9..e5abfc7d25 100644 --- a/support/split-logfile.in +++ b/support/split-logfile.in @@ -29,7 +29,7 @@ use strict; use warnings; -my %is_open = (); +my %log_file = (); while (my $log_line = ) { # @@ -54,10 +54,9 @@ while (my $log_line = ) { # If the log file for this virtual host isn't opened # yet, do it now. # - if (! $is_open{$vhost}) { - open $vhost, ">>${vhost}.log" + if (! $log_file{$vhost}) { + open $log_file{$vhost}, ">>${vhost}.log" or die ("Can't open ${vhost}.log"); - $is_open{$vhost} = 1; } # # Strip off the first token (which may be null in the @@ -65,6 +64,6 @@ while (my $log_line = ) { # record to the current log file. # $log_line =~ s/^\S*\s+//; - printf $vhost "%s", $log_line; + print {$log_file{$vhost}} $log_line; } exit 0;