mirror of
https://github.com/apache/httpd.git
synced 2025-08-06 11:06:17 +00:00
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 <mauermann gmail.com> Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1648719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
4
CHANGES
4
CHANGES
@ -1,6 +1,10 @@
|
|||||||
-*- coding: utf-8 -*-
|
-*- coding: utf-8 -*-
|
||||||
Changes with Apache 2.5.0
|
Changes with Apache 2.5.0
|
||||||
|
|
||||||
|
*) split-logfile: Fix perl error: 'Can't use string ("example.org:80")
|
||||||
|
as a symbol ref while "strict refs"'. PR 56329.
|
||||||
|
[Holger Mauermann <mauermann gmail.com>]
|
||||||
|
|
||||||
*) mod_proxy: Prevent ProxyPassReverse from doing a substitution when
|
*) mod_proxy: Prevent ProxyPassReverse from doing a substitution when
|
||||||
the URL parameter interpolates to an empty string. PR 56603.
|
the URL parameter interpolates to an empty string. PR 56603.
|
||||||
[<ajprout hotmail.com>]
|
[<ajprout hotmail.com>]
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my %is_open = ();
|
my %log_file = ();
|
||||||
|
|
||||||
while (my $log_line = <STDIN>) {
|
while (my $log_line = <STDIN>) {
|
||||||
#
|
#
|
||||||
@ -54,10 +54,9 @@ while (my $log_line = <STDIN>) {
|
|||||||
# If the log file for this virtual host isn't opened
|
# If the log file for this virtual host isn't opened
|
||||||
# yet, do it now.
|
# yet, do it now.
|
||||||
#
|
#
|
||||||
if (! $is_open{$vhost}) {
|
if (! $log_file{$vhost}) {
|
||||||
open $vhost, ">>${vhost}.log"
|
open $log_file{$vhost}, ">>${vhost}.log"
|
||||||
or die ("Can't open ${vhost}.log");
|
or die ("Can't open ${vhost}.log");
|
||||||
$is_open{$vhost} = 1;
|
|
||||||
}
|
}
|
||||||
#
|
#
|
||||||
# Strip off the first token (which may be null in the
|
# Strip off the first token (which may be null in the
|
||||||
@ -65,6 +64,6 @@ while (my $log_line = <STDIN>) {
|
|||||||
# record to the current log file.
|
# record to the current log file.
|
||||||
#
|
#
|
||||||
$log_line =~ s/^\S*\s+//;
|
$log_line =~ s/^\S*\s+//;
|
||||||
printf $vhost "%s", $log_line;
|
print {$log_file{$vhost}} $log_line;
|
||||||
}
|
}
|
||||||
exit 0;
|
exit 0;
|
||||||
|
Reference in New Issue
Block a user