You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Mark Hedges <Ma...@Ticketmaster.com> on 2014/06/24 01:01:32 UTC

RE: APREQ_ERROR_MISMATCH error, I think

No one seems home on the apreq-dev list so I'm ccing mod_perl in the hope someone can help.  Sorry if that annoys anyone.

I rebuilt everything using perl 5.20.0, Apache 2.2.27 will all the mods, mod_perl svn trunk.

When I use Apache2::Request, I get a server error, it fails with the message "Conflicting information," which seems to be related to the APREQ_ERROR_MISMATCH constant, but I don't know how to debug this.

When I comment out creating the Apache2::Request object from $r, my dummy test handler runs fine.

How would I try to debug this?

Mark

-----Original Message-----
From: Mark Hedges 
Sent: Friday, June 20, 2014 5:51 PM
To: apreq-dev@httpd.apache.org
Cc: Mark Hedges
Subject: APREQ_ERROR_MISMATCH error, I think

Any clues for the clueless?

This is accompanied by a 500 internal server error.

The same handler works fine when I do not use Apache2::Request.  It is just a test handler to print out a string.

Thanks.
-Mark

-----------------------
t/logs/error_log:
----
[Fri Jun 20 17:43:13.014222 2014] [mpm_event:notice] [pid 30042:tid 47602811847312] AH00489: Apache/2.4.9 (Unix) mod_apreq2-20090110/2.8.0 mod_perl/2.0.9dev Perl/v5.20.0 configured -- resuming normal operations
...
[Fri Jun 20 17:43:13.014745 2014] [mpm_event:debug] [pid 30043:tid 1088698688] event.c(1949): AH02471: start_threads: Using epoll
...
[Fri Jun 20 17:43:14.934954 2014] [authz_core:debug] [pid 30043:tid 1120168256] mod_authz_core.c(828): [client 127.0.0.1:60081] AH01628: authorization result: granted (no directives)
[Fri Jun 20 17:43:14.953412 2014] [perl:error] [pid 30043:tid 1120168256] [client 127.0.0.1:60081] Conflicting information


-------------------------
extra.last.conf.in:
---
PerlSetEnv NTF_TEST_DIR @ServerRoot@

#LoadModule allowmethods_module /ntfhome/local/libexec/httpd/mod_allowmethods.so

# where Apache2::Controller and the test application libs can be found
PerlSwitches -I@ServerRoot@/blib
PerlLoadModule Apache2::RequestRec
PerlLoadModule Apache2::RequestIO
PerlLoadModule Apache2::Log
PerlLoadModule Apache2::RequestUtil

<Perl>
    use NTF::Handler::NTR;
    $NTFHandlers::NTR = NTF::Handler::NTR->new();
</Perl>

# startup file handled by Apache::Test
# (add stuff to t/conf/modperl_extra.pl)

<LocationMatch '^/foo\b'>
    SetHandler modperl
    PerlResponseHandler $NTFHandlers::NTR->redirect
</LocationMatch>

-------------------------------
package NTF::Handler::NTR;

use strict;
use warnings FATAL => 'all';
use English '-no_match_vars';

use YAML::XS;
use Readonly;

Readonly::Hash my %APREQ_NEW_PARAMS => (
    POST_MAX            => 1,
    MAX_BODY            => 1,
    DISABLE_UPLOADS     => 1,
);

use Apache2::Const -compile => qw(
    OK
    HTTP_OK
    REDIRECT
    HTTP_BAD_REQUEST
);

use Apache2::Log;
use Apache2::RequestIO;
# use Apache2::Request;

sub new { return bless {}, __PACKAGE__ }

sub redirect : method {
    my ($self, $r) = @_;

    # minor annoyance, have to do this every time
    $self->{r} = $r;
 #  my $req = Apache2::Request->new($r, %APREQ_NEW_PARAMS);

    $r->content_type('text/plain');
    $self->{r}->print("KIRK\n");

    delete $self->{r};
    delete $self->{apreq};

    return Apache2::Const::OK;
}

RE: APREQ_ERROR_MISMATCH error, I think

Posted by Mark Hedges <Ma...@Ticketmaster.com>.
D'oh sorry bad value for POST_MAX, please ignore.  -Mark

-----Original Message-----
From: Mark Hedges 
Sent: Monday, June 23, 2014 4:02 PM
To: apreq-dev@httpd.apache.org; mod_perl list
Cc: Mark Hedges
Subject: RE: APREQ_ERROR_MISMATCH error, I think

No one seems home on the apreq-dev list so I'm ccing mod_perl in the hope someone can help.  Sorry if that annoys anyone.

I rebuilt everything using perl 5.20.0, Apache 2.2.27 will all the mods, mod_perl svn trunk.

When I use Apache2::Request, I get a server error, it fails with the message "Conflicting information," which seems to be related to the APREQ_ERROR_MISMATCH constant, but I don't know how to debug this.

When I comment out creating the Apache2::Request object from $r, my dummy test handler runs fine.

How would I try to debug this?

Mark

-----Original Message-----
From: Mark Hedges 
Sent: Friday, June 20, 2014 5:51 PM
To: apreq-dev@httpd.apache.org
Cc: Mark Hedges
Subject: APREQ_ERROR_MISMATCH error, I think

Any clues for the clueless?

This is accompanied by a 500 internal server error.

The same handler works fine when I do not use Apache2::Request.  It is just a test handler to print out a string.

Thanks.
-Mark

-----------------------
t/logs/error_log:
----
[Fri Jun 20 17:43:13.014222 2014] [mpm_event:notice] [pid 30042:tid 47602811847312] AH00489: Apache/2.4.9 (Unix) mod_apreq2-20090110/2.8.0 mod_perl/2.0.9dev Perl/v5.20.0 configured -- resuming normal operations
...
[Fri Jun 20 17:43:13.014745 2014] [mpm_event:debug] [pid 30043:tid 1088698688] event.c(1949): AH02471: start_threads: Using epoll
...
[Fri Jun 20 17:43:14.934954 2014] [authz_core:debug] [pid 30043:tid 1120168256] mod_authz_core.c(828): [client 127.0.0.1:60081] AH01628: authorization result: granted (no directives)
[Fri Jun 20 17:43:14.953412 2014] [perl:error] [pid 30043:tid 1120168256] [client 127.0.0.1:60081] Conflicting information


-------------------------
extra.last.conf.in:
---
PerlSetEnv NTF_TEST_DIR @ServerRoot@

#LoadModule allowmethods_module /ntfhome/local/libexec/httpd/mod_allowmethods.so

# where Apache2::Controller and the test application libs can be found
PerlSwitches -I@ServerRoot@/blib
PerlLoadModule Apache2::RequestRec
PerlLoadModule Apache2::RequestIO
PerlLoadModule Apache2::Log
PerlLoadModule Apache2::RequestUtil

<Perl>
    use NTF::Handler::NTR;
    $NTFHandlers::NTR = NTF::Handler::NTR->new();
</Perl>

# startup file handled by Apache::Test
# (add stuff to t/conf/modperl_extra.pl)

<LocationMatch '^/foo\b'>
    SetHandler modperl
    PerlResponseHandler $NTFHandlers::NTR->redirect
</LocationMatch>

-------------------------------
package NTF::Handler::NTR;

use strict;
use warnings FATAL => 'all';
use English '-no_match_vars';

use YAML::XS;
use Readonly;

Readonly::Hash my %APREQ_NEW_PARAMS => (
    POST_MAX            => 1,
    MAX_BODY            => 1,
    DISABLE_UPLOADS     => 1,
);

use Apache2::Const -compile => qw(
    OK
    HTTP_OK
    REDIRECT
    HTTP_BAD_REQUEST
);

use Apache2::Log;
use Apache2::RequestIO;
# use Apache2::Request;

sub new { return bless {}, __PACKAGE__ }

sub redirect : method {
    my ($self, $r) = @_;

    # minor annoyance, have to do this every time
    $self->{r} = $r;
 #  my $req = Apache2::Request->new($r, %APREQ_NEW_PARAMS);

    $r->content_type('text/plain');
    $self->{r}->print("KIRK\n");

    delete $self->{r};
    delete $self->{apreq};

    return Apache2::Const::OK;
}

RE: APREQ_ERROR_MISMATCH error, I think

Posted by Mark Hedges <Ma...@Ticketmaster.com>.
D'oh sorry bad value for POST_MAX, please ignore.  -Mark

-----Original Message-----
From: Mark Hedges 
Sent: Monday, June 23, 2014 4:02 PM
To: apreq-dev@httpd.apache.org; mod_perl list
Cc: Mark Hedges
Subject: RE: APREQ_ERROR_MISMATCH error, I think

No one seems home on the apreq-dev list so I'm ccing mod_perl in the hope someone can help.  Sorry if that annoys anyone.

I rebuilt everything using perl 5.20.0, Apache 2.2.27 will all the mods, mod_perl svn trunk.

When I use Apache2::Request, I get a server error, it fails with the message "Conflicting information," which seems to be related to the APREQ_ERROR_MISMATCH constant, but I don't know how to debug this.

When I comment out creating the Apache2::Request object from $r, my dummy test handler runs fine.

How would I try to debug this?

Mark

-----Original Message-----
From: Mark Hedges 
Sent: Friday, June 20, 2014 5:51 PM
To: apreq-dev@httpd.apache.org
Cc: Mark Hedges
Subject: APREQ_ERROR_MISMATCH error, I think

Any clues for the clueless?

This is accompanied by a 500 internal server error.

The same handler works fine when I do not use Apache2::Request.  It is just a test handler to print out a string.

Thanks.
-Mark

-----------------------
t/logs/error_log:
----
[Fri Jun 20 17:43:13.014222 2014] [mpm_event:notice] [pid 30042:tid 47602811847312] AH00489: Apache/2.4.9 (Unix) mod_apreq2-20090110/2.8.0 mod_perl/2.0.9dev Perl/v5.20.0 configured -- resuming normal operations
...
[Fri Jun 20 17:43:13.014745 2014] [mpm_event:debug] [pid 30043:tid 1088698688] event.c(1949): AH02471: start_threads: Using epoll
...
[Fri Jun 20 17:43:14.934954 2014] [authz_core:debug] [pid 30043:tid 1120168256] mod_authz_core.c(828): [client 127.0.0.1:60081] AH01628: authorization result: granted (no directives)
[Fri Jun 20 17:43:14.953412 2014] [perl:error] [pid 30043:tid 1120168256] [client 127.0.0.1:60081] Conflicting information


-------------------------
extra.last.conf.in:
---
PerlSetEnv NTF_TEST_DIR @ServerRoot@

#LoadModule allowmethods_module /ntfhome/local/libexec/httpd/mod_allowmethods.so

# where Apache2::Controller and the test application libs can be found
PerlSwitches -I@ServerRoot@/blib
PerlLoadModule Apache2::RequestRec
PerlLoadModule Apache2::RequestIO
PerlLoadModule Apache2::Log
PerlLoadModule Apache2::RequestUtil

<Perl>
    use NTF::Handler::NTR;
    $NTFHandlers::NTR = NTF::Handler::NTR->new();
</Perl>

# startup file handled by Apache::Test
# (add stuff to t/conf/modperl_extra.pl)

<LocationMatch '^/foo\b'>
    SetHandler modperl
    PerlResponseHandler $NTFHandlers::NTR->redirect
</LocationMatch>

-------------------------------
package NTF::Handler::NTR;

use strict;
use warnings FATAL => 'all';
use English '-no_match_vars';

use YAML::XS;
use Readonly;

Readonly::Hash my %APREQ_NEW_PARAMS => (
    POST_MAX            => 1,
    MAX_BODY            => 1,
    DISABLE_UPLOADS     => 1,
);

use Apache2::Const -compile => qw(
    OK
    HTTP_OK
    REDIRECT
    HTTP_BAD_REQUEST
);

use Apache2::Log;
use Apache2::RequestIO;
# use Apache2::Request;

sub new { return bless {}, __PACKAGE__ }

sub redirect : method {
    my ($self, $r) = @_;

    # minor annoyance, have to do this every time
    $self->{r} = $r;
 #  my $req = Apache2::Request->new($r, %APREQ_NEW_PARAMS);

    $r->content_type('text/plain');
    $self->{r}->print("KIRK\n");

    delete $self->{r};
    delete $self->{apreq};

    return Apache2::Const::OK;
}