[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#130883: marked as done (libapache-mod-perl: mod_perl confused about method vs. direct calls when using internal_redirect)



Your message dated Sun, 25 Jan 2004 18:46:27 -0800
with message-id <200401251846.34245.medwards-debian@sane.net>
and subject line No bug here (error in test case)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 26 Jan 2002 04:49:22 +0000
>From phil@fifi.org Fri Jan 25 22:49:22 2002
Return-path: <phil@fifi.org>
Received: from tantale.fifi.org [216.27.190.146] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 16UKmH-0008L4-00; Fri, 25 Jan 2002 22:49:21 -0600
Received: from localhost (root@localhost [127.0.0.1])
	by tantale.fifi.org (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id UAA18807
	for <submit@bugs.debian.org>; Fri, 25 Jan 2002 20:49:20 -0800
Received: from film.fifi.org (phil@localhost [127.0.0.1])
	by localhost (8.12.1/8.12.1/Debian -5) with ESMTP id g0Q4gvCV010619
	for <submit@bugs.debian.org>; Fri, 25 Jan 2002 20:42:57 -0800
Received: (from phil@localhost)
	by film.fifi.org (8.12.1/8.12.1/Debian -5) id g0Q4guVm010616;
	Fri, 25 Jan 2002 20:42:56 -0800
Sender: phil@fifi.org
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libapache-mod-perl: mod_perl confused about method vs. direct calls when using internal_redirect
X-Debbugs-CC: Philippe Troin <phil@fifi.org>
From: Philippe Troin <phil@fifi.org>
Date: 25 Jan 2002 20:42:56 -0800
Message-ID: <87sn8thgdr.fsf@film.fifi.org>
Lines: 126
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: submit@bugs.debian.org

Package: libapache-mod-perl
Version: 1.26-1
Severity: normal

Assuming this startup.pl file:

======================================================================
# Common
package Common;

use Apache::Constants qw(:common);

sub handler($$)
  {
    my $self = shift;
    my $req = shift;
    $req->content_type('text/plain');
    $req->send_http_header();
    $req->print($self->doit());
    return OK;
  }

sub doit
  {
    return "COMMON";
  }

# Common::Impl1
package Common::Impl1;

@ISA=qw(Common);

sub doit
  {
    return "IMPL1\n";
  }

# Common::Impl2;
package Common::Impl2;

@ISA=qw(Common);

sub doit
  {
    return "IMPL2\n";
  }

# Redir
package Redir;

use Apache::Constants qw(:common);

sub handler
  {
    my $req = shift;
    $req->internal_redirect("/1");
    return OK;
  }

1;
======================================================================

and assuming this perl configuration:

======================================================================
<Location /0>
  Order allow,deny
  Allow from all
  SetHandler perl-script
  PerlHandler Common
</Location>

<Location /1>
  Order allow,deny
  Allow from all
  SetHandler perl-script
  PerlHandler Common::Impl1
</Location>

<Location /2>
  Order allow,deny
  Allow from all
  SetHandler perl-script
  PerlHandler Common::Impl2
</Location>

<Location /R>
  Order allow,deny
  Allow from all
  SetHandler perl-script
  PerlHandler Redir
</Location>

PerlRequire startup.pl
======================================================================

Then, directing a browser to /0 prints COMMON, to /1 prints IMPL1, to
/2 prints IMPL2. Similarly, when pointing to R which redirects
internally to /1, IMPL1 should appear.

However, I get a 500 Internal server error and this in the logs:

[error] Undefined subroutine &Common::Impl1::handler called at
startup.pl line 49.

That seems wrong.
I hope this terse bug makes sense to you ;-)

Phil.


-- System Information
Debian Release: 3.0
Kernel Version: Linux film 2.2.20 #1 SMP Fri Nov 9 22:12:41 PST 2001 i686 unknown

Versions of the packages libapache-mod-perl depends on:
ii  apache-common  1.3.22-2.1     Support files for all Apache webservers
ii  libc6          2.2.4-7        GNU C Library: Shared libraries and Timezone
ii  libdevel-symdu 2.00-5         Perl module for inspecting perl's symbol tab
ii  libmime-base64 2.12-4         MIME/Base64 decoding for Perl
ii  libperl5.6     5.6.1-6        Shared Perl library.
ii  liburi-perl    1.15-1         Manipulates and accesses URI strings
ii  libwww-perl    5.53-2         WWW client/server library for Perl
ii  perl           5.6.1-6        Larry Wall's Practical Extraction and Report
ii  perl-base      5.6.1-6        The Pathologically Eclectic Rubbish Lister.
	^^^ (Provides virtual package perlapi-5.6.1)

---------------------------------------
Received: (at 130883-done) by bugs.debian.org; 26 Jan 2004 02:46:38 +0000
>From medwards-debian@sane.net Sun Jan 25 18:46:38 2004
Return-path: <medwards-debian@sane.net>
Received: from adsl-64-175-14-58.dsl.snfc21.pacbell.net (pobox) [64.175.14.58] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Akwlq-0000Vd-00; Sun, 25 Jan 2004 18:46:38 -0800
Received: from dobby.dmz.sane.net (dobby.dmz.sane.net [::ffff:192.168.1.99])
  (IDENT: sane)
  by pobox with esmtp; Sun, 25 Jan 2004 18:46:36 -0800
From: "Michael K. Edwards" <medwards-debian@sane.net>
Organization: SANE.net
To: 130883-done@bugs.debian.org
Subject: No bug here (error in test case)
Date: Sun, 25 Jan 2004 18:46:27 -0800
User-Agent: KMail/1.5.4
Cc: Pierfrancesco Caci <ik5pvx@home.tippete.net>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Description: clearsigned data
Content-Disposition: inline
Message-Id: <200401251846.34245.medwards-debian@sane.net>
Delivered-To: 130883-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_01_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=2.6 required=4.0 tests=UPPERCASE_25_50 autolearn=no 
	version=2.60-bugs.debian.org_2004_01_25
X-Spam-Level: **

=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The test case calls internal_redirect on the wrong object.  Correcting the=
=20
Redir package handler as shown below causes it to behave as expected.  ($re=
q=20
should be set from the handler's second argument, not its first.)

=2D - Michael

# Redir
package Redir;

use Apache::Constants qw(:common);

sub handler($$)
  {
    my $self =3D shift;
    my $req =3D shift;
    $req->internal_redirect("/1");
    return OK;
  }
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAFH+DVDidajON4cURArDlAKCKE3O6KLsIFzgHrcMtPe+O0j/NKQCgst69
cAGVtoXPcreNAOoovjUnfqg=3D
=3D51Pk
=2D----END PGP SIGNATURE-----



Reply to: