[interchange-cvs] interchange - jon modified lib/Vend/ModPerl.pm
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Sat Nov 23 23:39:00 2002
User: jon
Date: 2002-11-24 04:38:50 GMT
Modified: lib/Vend ModPerl.pm
Log:
Fix bug that kept only first of stacked CGI variables.
Add some logging and timing calls used in UNIX and INET mode.
Revision Changes Path
2.3 +20 -6 interchange/lib/Vend/ModPerl.pm
rev 2.3, prev_rev 2.2
Index: ModPerl.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/ModPerl.pm,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -u -r2.2 -r2.3
--- ModPerl.pm 9 Jul 2002 00:17:34 -0000 2.2
+++ ModPerl.pm 24 Nov 2002 04:38:50 -0000 2.3
@@ -1,8 +1,8 @@
# Vend::ModPerl - Run Interchange inside Apache and mod_perl
#
-# $Id: ModPerl.pm,v 2.2 2002/07/09 00:17:34 jon Exp $
+# $Id: ModPerl.pm,v 2.3 2002/11/24 04:38:50 jon Exp $
#
-# Copyright (C) 2002 Red Hat, Inc. <interchange@redhat.com>
+# Copyright (C) 2002 Red Hat, Inc. and Jon Jensen <jon@icdevgroup.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,13 +20,14 @@
package Vend::ModPerl;
-$VERSION = substr(q$Revision: 2.2 $, 10);
+$VERSION = substr(q$Revision: 2.3 $, 10);
use Apache::Constants qw(:common);
use Apache::Request ();
use Apache::URI ();
use Apache::Server ();
use Vend::Server;
+use Vend::Util;
use strict;
@@ -41,6 +42,12 @@
@Global::argv = ();
Vend::Server::reset_vars();
+
+ if($Global::ShowTimes) {
+ @Vend::Times = times();
+ ::logDebug("begin connection. Summary time set to zero");
+ }
+
$::Instance = {};
my (%env, $entity);
%env = %ENV;
@@ -54,15 +61,22 @@
# not handling MV3-style requests or TolerateGet compatibility yet
my $apr = Apache::Request->new($r);
- for ($apr->param) {
- Vend::Server::store_cgi_kv($_, $apr->param($_));
+ for my $k ($apr->param) {
+ for my $v ($apr->param($k)) {
+ Vend::Server::store_cgi_kv($k, $v);
+ }
}
- undef *STDOUT;
tie *OUT, 'Apache';
my $http = new Vend::Server \*OUT, \%env, \$entity;
return NOT_FOUND unless $http;
+
+ # Can log all CGI inputs
+ log_http_data($http) if $Global::Logging;
+
+ show_times("begin dispatch") if $Global::ShowTimes;
::dispatch($http);
+ show_times("end connection") if $Global::ShowTimes;
undef $::Instance;
undef $Vend::Cfg;
return OK;