cvs commit: modperl-2.0/lib/Apache compat.pm

2003-02-17 Thread stas
stas2003/02/17 01:47:31

  Modified:lib/Apache compat.pm
  Log:
  move current_callback from the package Apache to the package
  Apache::RequestRec, so it won't clash with the new API
  
  Revision  ChangesPath
  1.79  +4 -4  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- compat.pm 17 Feb 2003 09:03:16 -  1.78
  +++ compat.pm 17 Feb 2003 09:47:31 -  1.79
  @@ -125,10 +125,6 @@
   die $err if $err;
   }
   
  -sub current_callback {
  -return Apache::current_callback();
  -}
  -
   package Apache::Constants;
   
   use Apache::Const ();
  @@ -153,6 +149,10 @@
   sub hard_timeout {}
   sub kill_timeout {}
   sub reset_timeout {}
  +
  +sub current_callback {
  +return Apache::current_callback();
  +}
   
   #to support $r->server_root_relative
   *server_root_relative = \&Apache::server_root_relative;
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-11-23 Thread dougm
dougm   2002/11/23 14:35:06

  Modified:.Changes
   lib/Apache compat.pm
  Log:
  Submitted by: Walery Studennikov <[EMAIL PROTECTED]>
  Reviewed by:  dougm
  tr/+/ /; in parse_args compat method
  
  Revision  ChangesPath
  1.59  +1 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- Changes   22 Oct 2002 15:13:22 -  1.58
  +++ Changes   23 Nov 2002 22:35:06 -  1.59
  @@ -17,7 +17,7 @@
   
   fix delete $ENV{$key} bug
   
  -fix parse_args compat method to support non-ascii characters
  +fix parse_args compat method to support non-ascii characters and tr/+/ /
   [Walery Studennikov <[EMAIL PROTECTED]>]
   
   fix post_connection compat method to behave as it did in 1.x
  
  
  
  1.71  +2 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- compat.pm 21 Oct 2002 20:21:34 -  1.70
  +++ compat.pm 23 Nov 2002 22:35:06 -  1.71
  @@ -213,11 +213,13 @@
   $r->connection->get_remote_host($type, $r->per_dir_config);
   }
   
  +#XXX: should port 1.x's Apache::unescape_url_info
   sub parse_args {
   my($r, $string) = @_;
   return () unless defined $string and $string;
   
   return map {
  +tr/+/ /;
   s/%([0-9a-fA-F]{2})/pack("C",hex($1))/ge;
   $_;
   } split /[=&;]/, $string, -1;
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-10-21 Thread dougm
dougm   2002/10/21 13:21:35

  Modified:.Changes
   lib/Apache compat.pm
  Log:
  Submitted by: Walery Studennikov <[EMAIL PROTECTED]>
  Reviewed by:  dougm
  fix parse_args compat method to support non-ascii characters
  
  Revision  ChangesPath
  1.55  +3 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- Changes   21 Oct 2002 20:18:10 -  1.54
  +++ Changes   21 Oct 2002 20:21:33 -  1.55
  @@ -10,6 +10,9 @@
   
   =item 1.99_08-dev
   
  +fix parse_args compat method to support non-ascii characters
  +[Walery Studennikov <[EMAIL PROTECTED]>]
  +
   fix post_connection compat method to behave as it did in 1.x
   [Geoff Young <[EMAIL PROTECTED]>]
   
  
  
  
  1.70  +1 -1  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- compat.pm 21 Oct 2002 20:18:10 -  1.69
  +++ compat.pm 21 Oct 2002 20:21:34 -  1.70
  @@ -218,7 +218,7 @@
   return () unless defined $string and $string;
   
   return map {
  -s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
  +s/%([0-9a-fA-F]{2})/pack("C",hex($1))/ge;
   $_;
   } split /[=&;]/, $string, -1;
   }
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-10-06 Thread dougm

dougm   2002/10/06 22:04:13

  Modified:lib/Apache compat.pm
  Log:
  Submitted by: gozer
  Reviewed by:  dougm
  prefer Apache->request to Apache->server in httpd_conf method
  
  Revision  ChangesPath
  1.68  +2 -1  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- compat.pm 7 Oct 2002 02:44:30 -   1.67
  +++ compat.pm 7 Oct 2002 05:04:13 -   1.68
  @@ -112,7 +112,8 @@
   
   sub httpd_conf {
   shift;
  -my $err = Apache->server->add_config([split /\n/, join '', @_]);
  +my $err = (Apache->request || Apache->server)->
  +  add_config([split /\n/, join '', @_]);
   die $err if $err;
   }
   
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-06-30 Thread stas

stas2002/06/30 21:55:42

  Modified:lib/Apache compat.pm
  Log:
  enable warnings
  
  Revision  ChangesPath
  1.63  +1 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- compat.pm 1 Jul 2002 04:54:09 -   1.62
  +++ compat.pm 1 Jul 2002 04:55:42 -   1.63
  @@ -1,6 +1,7 @@
   package Apache::compat;
   
   use strict;
  +use warnings FATAL => 'all';
   
   #1.xx compat layer
   #some of this will stay as-is
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-06-30 Thread stas

stas2002/06/30 21:54:09

  Modified:lib/Apache compat.pm
  Log:
  make sure that the call is made as Apache->module($name) (2 arguments)
  and not Apache::module($name)
  
  Revision  ChangesPath
  1.62  +1 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- compat.pm 4 Jun 2002 12:40:53 -   1.61
  +++ compat.pm 1 Jul 2002 04:54:09 -   1.62
  @@ -92,6 +92,7 @@
   
   sub module {
   require Apache::Module;
  +die 'Usage: Apache->module($name)' if @_ != 2;
   return Apache::Module::loaded($_[1]);
   }
   
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-06-03 Thread dougm

dougm   2002/06/03 11:23:16

  Modified:lib/Apache compat.pm
  Log:
  use Apache::SubRequest; for $r->lookup_{file,uri} compat
  
  Revision  ChangesPath
  1.58  +1 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- compat.pm 30 May 2002 04:05:06 -  1.57
  +++ compat.pm 3 Jun 2002 18:23:16 -   1.58
  @@ -19,6 +19,7 @@
   #
   
   use Apache::RequestRec ();
  +use Apache::SubRequest ();
   use Apache::Connection ();
   use Apache::Server ();
   use Apache::ServerUtil ();
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-29 Thread dougm

dougm   02/05/29 20:54:08

  Modified:lib/Apache compat.pm
  Log:
  prevent inclusion of Apache::Table
  
  Revision  ChangesPath
  1.56  +2 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- compat.pm 25 May 2002 17:49:03 -  1.55
  +++ compat.pm 30 May 2002 03:54:08 -  1.56
  @@ -43,6 +43,8 @@
   $INC{'Apache/Constants.pm'} = __FILE__;
   
   $INC{'Apache/File.pm'} = __FILE__;
  +
  +$INC{'Apache/Table.pm'} = __FILE__;
   }
   
   sub request {
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-24 Thread dougm

dougm   02/05/24 09:49:29

  Modified:lib/Apache compat.pm
  Log:
  add Apache::compat::request function
  
  Revision  ChangesPath
  1.49  +15 -7 modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- compat.pm 23 May 2002 04:58:05 -  1.48
  +++ compat.pm 24 May 2002 16:49:29 -  1.49
  @@ -42,6 +42,20 @@
   $INC{'Apache/File.pm'} = __FILE__;
   }
   
  +sub request {
  +my $what = shift;
  +
  +my $r = Apache->request;
  +
  +unless ($r) {
  +die "cannot use $what ",
  +"without 'SetHandler perl-script' ",
  +"or 'PerlOptions +GlobalRequest'";
  +}
  +
  +$r;
  +}
  +
   package Apache;
   
   sub exit {
  @@ -346,13 +360,7 @@
   sub tmpfile {
   my $class = shift;
   my $limit = 100;
  -my $r = Apache->request;
  -
  -unless ($r) {
  -die "cannot use Apache::File->tmpfile ",
  -"without 'SetHandler perl-script' ",
  -"or 'PerlOptions +GlobalRequest'";
  -}
  +my $r = Apache::compat::request('Apache::File->tmpfile');
   
   while ($limit--) {
   my $tmpfile = "$TMPDIR/${$}" . $TMPNAM++;
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-22 Thread dougm

dougm   02/05/22 21:58:05

  Modified:lib/Apache compat.pm
  Log:
  add compat function for Apache::Constants::SERVER_VERSION
  
  Revision  ChangesPath
  1.48  +2 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- compat.pm 23 May 2002 04:40:41 -  1.47
  +++ compat.pm 23 May 2002 04:58:05 -  1.48
  @@ -92,6 +92,8 @@
   #no need to support in 2.0
   sub export {}
   
  +sub SERVER_VERSION { Apache::get_server_version() }
  +
   package Apache::RequestRec;
   
   #no longer exist in 2.0
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-22 Thread dougm

dougm   02/05/22 21:40:41

  Modified:lib/Apache compat.pm
  Log:
  add Apache::Constants::export stub for compat
  
  Revision  ChangesPath
  1.47  +3 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- compat.pm 23 May 2002 03:10:18 -  1.46
  +++ compat.pm 23 May 2002 04:40:41 -  1.47
  @@ -89,6 +89,9 @@
   Apache::Const->compile($package => @_);
   }
   
  +#no need to support in 2.0
  +sub export {}
  +
   package Apache::RequestRec;
   
   #no longer exist in 2.0
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-22 Thread dougm

dougm   02/05/22 20:10:18

  Modified:lib/Apache compat.pm
  Log:
  add noop stubs for timeout functions removed from 2.0:
  $r->{soft,hard,reset,kill}_timeout
  
  Revision  ChangesPath
  1.46  +6 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- compat.pm 19 May 2002 11:41:53 -  1.45
  +++ compat.pm 23 May 2002 03:10:18 -  1.46
  @@ -91,6 +91,12 @@
   
   package Apache::RequestRec;
   
  +#no longer exist in 2.0
  +sub soft_timeout {}
  +sub hard_timeout {}
  +sub kill_timeout {}
  +sub reset_timeout {}
  +
   #to support $r->server_root_relative
   *server_root_relative = \&Apache::server_root_relative;
   
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-17 Thread dougm

dougm   02/05/17 18:12:15

  Modified:lib/Apache compat.pm
  Log:
  Submitted by: Dave Rolsky <[EMAIL PROTECTED]>
  Reviewed by:  dougm
  use Apache::ServerUtil in Apache::compat so Apache->server works in compat mode
  
  Revision  ChangesPath
  1.44  +1 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- compat.pm 14 May 2002 01:32:50 -  1.43
  +++ compat.pm 18 May 2002 01:12:15 -  1.44
  @@ -21,6 +21,7 @@
   use Apache::RequestRec ();
   use Apache::Connection ();
   use Apache::Server ();
  +use Apache::ServerUtil ();
   use Apache::Access ();
   use Apache::RequestIO ();
   use Apache::RequestUtil ();
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-12 Thread dougm

dougm   02/05/12 16:48:16

  Modified:lib/Apache compat.pm
  Log:
  send_fd_length filehandle needs binmode
  
  Revision  ChangesPath
  1.41  +2 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- compat.pm 10 May 2002 16:49:10 -  1.40
  +++ compat.pm 12 May 2002 23:48:16 -  1.41
  @@ -262,6 +262,8 @@
   $len = IOBUFSIZE;
   }
   
  +binmode $fh;
  +
   while (CORE::read($fh, $buff, $len)) {
   $total_bytes_sent += $r->puts($buff);
   }
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-10 Thread dougm

dougm   02/05/10 09:38:39

  Modified:lib/Apache compat.pm
  Log:
  support Apache::URI->parse($r)
  
  Revision  ChangesPath
  1.39  +8 -1  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- compat.pm 10 May 2002 01:41:37 -  1.38
  +++ compat.pm 10 May 2002 16:38:39 -  1.39
  @@ -24,6 +24,7 @@
   use Apache::Access ();
   use Apache::RequestIO ();
   use Apache::RequestUtil ();
  +use Apache::ServerUtil ();
   use Apache::Response ();
   use Apache::Log ();
   use APR::Table ();
  @@ -382,7 +383,13 @@
   return $size;
   }
   
  -*Apache::URI::parse = \&APR::URI::parse;
  +sub Apache::URI::parse {
  +my($class, $r, $uri) = @_;
  +
  +$uri ||= $r->construct_url($r->uri, $r->pool);
  +
  +APR::URI->parse($r, $uri);
  +}
   
   1;
   __END__
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-05-09 Thread dougm

dougm   02/05/09 18:41:37

  Modified:lib/Apache compat.pm
  Log:
  alias Apache::URI::parse to APR::URI::parse in Apache::compat
  
  Revision  ChangesPath
  1.38  +3 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- compat.pm 7 Apr 2002 21:39:59 -   1.37
  +++ compat.pm 10 May 2002 01:41:37 -  1.38
  @@ -28,6 +28,7 @@
   use Apache::Log ();
   use APR::Table ();
   use APR::Pool ();
  +use APR::URI ();
   use mod_perl ();
   use Symbol ();
   
  @@ -380,6 +381,8 @@
   
   return $size;
   }
  +
  +*Apache::URI::parse = \&APR::URI::parse;
   
   1;
   __END__
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-04-07 Thread dougm

dougm   02/04/07 14:39:59

  Modified:lib/Apache compat.pm
  Log:
  add use strict and a fix caught by that
  
  Revision  ChangesPath
  1.37  +3 -1  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- compat.pm 7 Apr 2002 21:34:43 -   1.36
  +++ compat.pm 7 Apr 2002 21:39:59 -   1.37
  @@ -1,5 +1,7 @@
   package Apache::compat;
   
  +use strict;
  +
   #1.xx compat layer
   #some of this will stay as-is
   #some will be implemented proper later on
  @@ -252,7 +254,7 @@
   
   return 0 if $length == 0;
   
  -if (($length > 0) && ($total_bytes_send + IOBUFSIZE) > $length) {
  +if (($length > 0) && ($total_bytes_sent + IOBUFSIZE) > $length) {
   $len = $length - $total_bytes_sent;
   }
   else {
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-04-07 Thread dougm

dougm   02/04/07 14:34:43

  Modified:lib/Apache compat.pm
  Log:
  Submitted by:   Dave Rolsky <[EMAIL PROTECTED]>
  Reviewed by:  dougm
  a few fixes for Apache::compat
  
  Revision  ChangesPath
  1.36  +2 -2  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- compat.pm 24 Mar 2002 02:38:01 -  1.35
  +++ compat.pm 7 Apr 2002 21:34:43 -   1.36
  @@ -259,7 +259,7 @@
   $len = IOBUFSIZE;
   }
   
  -while (read($fh, $buff, $len)) {
  +while (CORE::read($fh, $buff, $len)) {
   $total_bytes_sent += $r->puts($buff);
   }
   
  @@ -369,7 +369,7 @@
   elsif ($size < 1048576) {
   $size = sprintf "%4dk", ($size + 512) / 1024;
   }
  -elsif (size < 103809024) {
  +elsif ($size < 103809024) {
   $size = sprintf "%4.1fM", $size / 1048576.0;
   }
   else {
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2002-03-23 Thread dougm

dougm   02/03/23 18:38:01

  Modified:lib/Apache compat.pm
  Log:
  need to use Apache::Log for compat mode
  
  Revision  ChangesPath
  1.35  +1 -0  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- compat.pm 29 Jan 2002 15:56:56 -  1.34
  +++ compat.pm 24 Mar 2002 02:38:01 -  1.35
  @@ -23,6 +23,7 @@
   use Apache::RequestIO ();
   use Apache::RequestUtil ();
   use Apache::Response ();
  +use Apache::Log ();
   use APR::Table ();
   use APR::Pool ();
   use mod_perl ();
  
  
  



cvs commit: modperl-2.0/lib/Apache compat.pm

2001-05-04 Thread dougm

dougm   01/05/04 11:19:43

  Modified:lib/Apache compat.pm
  Log:
  set $ENV{MOD_PERL} to $mod_perl::VERSION like 1.x does
  
  Revision  ChangesPath
  1.6   +2 -1  modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- compat.pm 2001/05/04 05:46:21 1.5
  +++ compat.pm 2001/05/04 18:19:37 1.6
  @@ -22,13 +22,14 @@
   use Apache::Access ();
   use Apache::RequestIO ();
   use Apache::RequestUtil ();
  +use mod_perl ();
   
   BEGIN {
   $INC{'Apache.pm'} = 1;
   
   $INC{'Apache/Constants.pm'} = 1;
   
  -$ENV{MOD_PERL} = 1;
  +$ENV{MOD_PERL} = $mod_perl::VERSION;
   }
   
   package Apache;