httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject [apreq-2] libapreq_cgi tests under env/t
Date Thu, 23 Oct 2003 04:34:06 GMT
Hi,
  The libapreq_cgi tests under env/cgi_test/t/, which
are now separately from the mod_apreq tests under
env/t/, all now pass (a patch to enable the building
and running of these tests under unix is attached - I've not
had a lot of experience with automake/autoconf, so may have
missed something here). These tests include fetching
paramaters and getting/setting cookie data.
   However, in trying to move the libapreq_cgi tests to run
with the mod_apreq tests under env/t/, there's still a
problem with GET requests. For example, this test:
============================================================
my $script = WIN32 ? '/cgi-bin/cgi_test.exe' : '/cgi-bin/cgi_test';
my $line_end = WIN32 ? "\r\n" : "\n";
my $filler = "0123456789" x 5; # < 64K

ok t_cmp("\tfoo => ?$line_end\tbar => hello world$line_end",
         GET_BODY("$script?foo=%3F&bar=hello+world"),
"simple get");
=======================================================================
results in a server error, with this in the error log:
=====================================================================
[Wed Oct 22 22:54:58 2003] [notice] Apache/2.0.47 (Unix) configured --
 resuming normal operations

[Wed Oct 22 22:54:58 2003] [debug] prefork.c(1037):
AcceptMutex: pthread (default: pthread)

[Wed Oct 22 22:54:59 2003] [debug] mod_apreq.c(215): [client
127.0.0.1] apreq request is now initialized (135596168)

[Wed Oct 22 22:54:59 2003] [debug] mod_apreq.c(333): [client
127.0.0.1] apreq filter is initialized (135596144)

[Wed Oct 22 22:54:59 2003] [debug] mod_apreq.c(365): [client
127.0.0.1] (70008)Partial results are valid but processing
is incomplete: entering filter (1)

[Wed Oct 22 22:54:59 2003] [debug] mod_apreq.c(427): [client
127.0.0.1] (70022)There is no error, this value signifies an
initialized error code: leaving filter (1)

[Wed Oct 22 22:55:00 2003] [debug] mod_apreq.c(215): [client
127.0.0.1] apreq request is now initialized (135597488)

[Wed Oct 22 22:55:00 2003] [debug] mod_apreq.c(333): [client
127.0.0.1] apreq filter is initialized (135597464)

[Wed Oct 22 22:55:00 2003] [debug] mod_apreq.c(365): [client
127.0.0.1] (70008)Partial results are valid but processing
is incomplete: entering filter (1)

[Wed Oct 22 22:55:00 2003] [debug] mod_apreq.c(427): [client
127.0.0.1] (70022)There is no error, this value signifies an
initialized error code: leaving filter (1)

[Wed Oct 22 22:55:00 2003] [debug] mod_apreq.c(365): [client
127.0.0.1] (70022)There is no error, this value signifies an
initialized error code: entering filter (1)

[Wed Oct 22 22:55:00 2003] [debug] mod_apreq.c(399): [client
127.0.0.1] (70022)There is no error, this value signifies an
initialized error code: removing filter(0)

===============================================================================
A POST request, such as
==============================================================================
my $script = WIN32 ? '/cgi-bin/cgi_test.exe' : '/cgi-bin/cgi_test';
my $line_end = WIN32 ? "\r\n" : "\n";
my $filler = "0123456789" x 5; # < 64K

my $body = POST_BODY("/$script", content =>
                     "aaa=$filler;foo=1;bar=2;filler=$filler");
ok t_cmp("\tfoo => 1$line_end\tbar => 2$line_end",
         $body, "simple post");
===========================================================================
is successful, and to compare, this is in the error log:
==========================================================================
[Wed Oct 22 22:55:35 2003] [notice] Apache/2.0.47 (Unix)
configured -- resuming normal operations

[Wed Oct 22 22:55:35 2003] [debug] prefork.c(1037):
AcceptMutex: pthread (default: pthread)

[Wed Oct 22 22:55:35 2003] [debug] mod_apreq.c(215): [client
127.0.0.1] apreq request is now initialized (135596168)

[Wed Oct 22 22:55:35 2003] [debug] mod_apreq.c(333): [client
127.0.0.1] apreq filter is initialized (135596144)

[Wed Oct 22 22:55:35 2003] [debug] mod_apreq.c(365): [client
127.0.0.1] (70008)Partial results are valid but processing
is incomplete: entering filter (1)

[Wed Oct 22 22:55:35 2003] [debug] mod_apreq.c(427): [client
127.0.0.1] (70022)There is no error, this value signifies an
initialized error code: leaving filter (1)

[Wed Oct 22 22:55:35 2003] [debug] mod_apreq.c(215): [client
127.0.0.1] apreq request is now initialized (135596488)

[Wed Oct 22 22:55:35 2003] [debug] mod_apreq.c(365): [client
127.0.0.1] (70008)Partial results are valid but processing
is incomplete: entering filter (1)

[Wed Oct 22 22:55:35 2003] [debug] mod_apreq.c(427): [client
127.0.0.1] leaving filter (1)

[Wed Oct 22 22:55:35 2003] [error] [client 127.0.0.1]
[cgi_test.c(109)] Creating apreq_request

[Wed Oct 22 22:55:35 2003] [error] [client 127.0.0.1]
[cgi_test.c(113)] Fetching the parameters

[Wed Oct 22 22:55:35 2003] [error] [client 127.0.0.1]
[cgi_test.c(124)] foo => 1

[Wed Oct 22 22:55:35 2003] [error] [client 127.0.0.1]
[cgi_test.c(128)] bar => 2
===========================================================================

(the [error] coming from cgi_test.c arises from the
use of fprintf(stderr, ...) in the trace, so is not
a server error).

I'm not sure what to look for here ... In the failed
GET request, the tracing in cgi_test.c aren't reached,
and one difference between the two is that the GET
request reports (at the end) that a filter was removed,
whereas in the POST request such removal doesn't happen.
Does the above suggest someplace to look further as to
what is going wrong?

-- 
best regards,
randy
Mime
View raw message