[interchange-cvs] interchange - heins modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Wed Sep 10 13:55:00 EDT 2003
User: heins
Date: 2003-09-10 16:55:15 GMT
Modified: lib/Vend Config.pm Server.pm
Log:
* Fix faulty patch associated with previous Server.pm and Config.pm commit.
Why did patch let me do this without warning?
Revision Changes Path
2.126 +2 -20 interchange/lib/Vend/Config.pm
rev 2.126, prev_rev 2.125
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.125
retrieving revision 2.126
diff -u -r2.125 -r2.126
--- Config.pm 10 Sep 2003 16:50:51 -0000 2.125
+++ Config.pm 10 Sep 2003 16:55:14 -0000 2.126
@@ -1,6 +1,6 @@
# Vend::Config - Configure Interchange
#
-# $Id: Config.pm,v 2.125 2003/09/10 16:50:51 mheins Exp $
+# $Id: Config.pm,v 2.126 2003/09/10 16:55:14 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -48,7 +48,7 @@
use Vend::File;
use Vend::Data;
-$VERSION = substr(q$Revision: 2.125 $, 10);
+$VERSION = substr(q$Revision: 2.126 $, 10);
my %CDname;
my %CPname;
@@ -524,24 +524,8 @@
['UserDB', 'locale', ''],
['UserDatabase', undef, ''], #undocumented
['RobotLimit', 'integer', 0],
- my $rfh = $s->{rfh};
- if($Vend::write_redirect and ! $rfh) {
- $rfh = gensym();
- my $fn = $Vend::Cfg->{RedirectCache} . $CGI::path_info;
- my $save = umask(022);
- open $rfh, "> $fn"
- or do {
- ::logError("Unable to write redirected page %s: %s", $fn, $!);
- undef $Vend::write_redirect;
- undef $rfh;
- };
- $s->{rfh} = $rfh;
- umask $save;
- }
-
['OrderLineLimit', 'integer', 0],
['StaticPage', 'warn', ''],
- print $rfh $$body if $rfh;
['StaticPath', 'warn', ''],
['StaticPattern', 'warn', ''],
['StaticSuffix', 'warn', ''],
@@ -619,7 +603,6 @@
return undef;
}
- print $rfh $$body if $rfh;
sub get_catalog_default {
my ($directive) = @_;
my $directives = catalog_directives();
@@ -876,7 +859,6 @@
#print "found $_\n";
undef $ifdef;
undef $begin_ifdef;
- close $http->{rfh} if $http->{rfh};
next;
}
if(/^\s*${leadinghash}if(n?)def\s+(.*)/i) {
2.41 +20 -2 interchange/lib/Vend/Server.pm
rev 2.41, prev_rev 2.40
Index: Server.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Server.pm,v
retrieving revision 2.40
retrieving revision 2.41
diff -u -r2.40 -r2.41
--- Server.pm 10 Sep 2003 16:50:51 -0000 2.40
+++ Server.pm 10 Sep 2003 16:55:14 -0000 2.41
@@ -1,6 +1,6 @@
# Vend::Server - Listen for Interchange CGI requests as a background server
#
-# $Id: Server.pm,v 2.40 2003/09/10 16:50:51 mheins Exp $
+# $Id: Server.pm,v 2.41 2003/09/10 16:55:14 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -26,7 +26,7 @@
package Vend::Server;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.40 $, 10);
+$VERSION = substr(q$Revision: 2.41 $, 10);
use POSIX qw(setsid strftime);
use Vend::Util;
@@ -524,8 +524,24 @@
# select($oldfh);
# END SUNOSDIGITAL
+ my $rfh = $s->{rfh};
+ if($Vend::write_redirect and ! $rfh) {
+ $rfh = gensym();
+ my $fn = $Vend::Cfg->{RedirectCache} . $CGI::path_info;
+ my $save = umask(022);
+ open $rfh, "> $fn"
+ or do {
+ ::logError("Unable to write redirected page %s: %s", $fn, $!);
+ undef $Vend::write_redirect;
+ undef $rfh;
+ };
+ $s->{rfh} = $rfh;
+ umask $save;
+ }
+
if($Vend::ResponseMade || $CGI::values{mv_no_header} ) {
print $fh $$body;
+ print $rfh $$body if $rfh;
#show_times("end response send") if $Global::ShowTimes;
return 1;
}
@@ -603,6 +619,7 @@
print $fh "\r\n";
print $fh $$body;
+ print $rfh $$body if $rfh;
#show_times("end response send") if $Global::ShowTimes;
$Vend::ResponseMade = 1;
}
@@ -859,6 +876,7 @@
show_times("begin dispatch") if $Global::ShowTimes;
::dispatch($http) if $http;
show_times("end connection") if $Global::ShowTimes;
+ close $http->{rfh} if $http->{rfh};
undef $Vend::Cfg;
}
More information about the interchange-cvs
mailing list