You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2003/10/10 19:24:01 UTC
clarification? Re: [VOTE] apreq-2 versioning system
Joe Schaefer wrote:
[...]
Before I vote, there are a few issues with the perl glue.
> for the perl glue-
>
> 1) Apache::Cookie and Apache::Request will be versioned
> starting from 2.0. This will likely cause pain for 1.3
> users that set their dependency requirements based on
> Apache::Request's version instead of libapreq's.
hopefully, this generation won't have its versions mismatching the release
versions (in 1.x we had 1, 1.1, 1.2), whereas here we probably want to have
2.00, 2.01, ... 2.15 etc.
Also should Apache::Request's version be the only one that has $VERSION and
use that for the release version?
> 2) Apache::libapreq will be renamed Apache::libapreq2, and should
> make the same installation info available that the
> apreq2-config script does.
rename? Do we have already Apache::libapreq?
What's important is that Apache::libapreq2 is needed only for CPAN module
dependecies. It shouldn't contain any code and shouldn't be really used in the
modules. Why? Because ideally a program working with libapreq1 should work the
same with libapreq2. Similarly, in mod_perl2 we have Apache2.pm, which you can
require in MakeMaker for mp2 and Apache.pm for mp1. Incidentally, since mp1
and mp2 aren't compatible each of these modules contain code, but as suggested
ideally for apreq it'd be good not to depend on libapreq.pm or libapreq2.pm in
the code itself.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: clarification? Re: [VOTE] apreq-2 versioning system
Posted by Stas Bekman <st...@stason.org>.
Joe Schaefer wrote:
> Stas Bekman <st...@stason.org> writes:
>
>
>>Joe Schaefer wrote:
>>
>>>Stas Bekman <st...@stason.org> writes:
>
>
> [...]
>
>
>>>>rename? Do we have already Apache::libapreq?
>>>
>>>We do.
>>
>>You mean, in httpd-apreq (1)? I can't find it in httpd-apreq-2:
>>
>> httpd-apreq-2> find . | grep libapreq.pm
>>
>>gives nothing.
>
>
> Sorry- I meant it already exists in httpd-apreq. There's
> no equivalent in httpd-apreq-2 yet. My comments related
> to Apache::libapreq2 were completely speculative.
Thanks Joe. So the vote should probably be:
2) Add Apache::libapreq2, which should
make the same installation info available that the
apreq2-config script does.
;) but no need to repost it, it's clear now.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [apreq-2] redirect on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Fri, 11 Oct 2003, Joe Schaefer wrote:
> Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
>
> [...]
>
> > -GET_BODY("/apreq_redirect_test?test=ok&location=$location%3Ftest=redirect"),
> > +GET_BODY("/apreq_redirect_test?test=ok&location=$location&test=redirect"),
> ^
> ^
> %3F is "?", not "&". Try the tests again with the shortened 10-byte
> $filler and "?" instead of "&". Do all 4 redirect tests still fail?
Yes, they fail the same way as with %3F - no redirect at all
is attempted (ie, in mod_apreq_redirect_test.c, loc is
null).
--
best regards,
randy
Re: [apreq-2] redirect on Win32
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
[...]
> -GET_BODY("/apreq_redirect_test?test=ok&location=$location%3Ftest=redirect"),
> +GET_BODY("/apreq_redirect_test?test=ok&location=$location&test=redirect"),
^
^
%3F is "?", not "&". Try the tests again with the shortened 10-byte
$filler and "?" instead of "&". Do all 4 redirect tests still fail?
--
Joe Schaefer
Re: [apreq-2] redirect on Win32
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> On Sat, 11 Oct 2003, Joe Schaefer wrote:
>
>
>>I now remember seeing this condition when I first wrote the
>>tests. There was a bug in apreq_parse_query_string() that disallowed
>>"=" signs in parameter values. I bet you're linking against
>>an older, installed version of libapreq instead of one built
>>from current cvs (the fix to apreq_params.c was applied when
>>I added the redirect tests last week).
>
>
> You're right (blush :) Thanks very much - the tests are
> all fine now, with the original env/t/request.t.
Both, mod_perl and libapreq users (and developers) quite often suffer from
this problem. Long ago I have suggested to have some magic number check, which
will verify that .so and .pm that are being loaded are from the same build.
Unfortunately I never had a chance to implement it. If apreq does it first,
I'll sure thing "steal" it for mod_perl ;)
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: [apreq-2] redirect on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 11 Oct 2003, Joe Schaefer wrote:
> I now remember seeing this condition when I first wrote the
> tests. There was a bug in apreq_parse_query_string() that disallowed
> "=" signs in parameter values. I bet you're linking against
> an older, installed version of libapreq instead of one built
> from current cvs (the fix to apreq_params.c was applied when
> I added the redirect tests last week).
You're right (blush :) Thanks very much - the tests are
all fine now, with the original env/t/request.t.
--
best regards,
randy
Re: [apreq-2] redirect on Win32
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
> Hi,
> There seems to be a problem with the apreq_redirect_test
> on Win32 with apreq-2. First off, env/t/request.t gives
> the results in the attached t1.txt, with the error log
> being e1.txt. The problem here is that no location is
> extracted (in e1.txt, there's debug messages from
> mod_apreq_redirect_test.c saying "looking for new location",
> but no corresponding "redirecting to / ..." twin.
I now remember seeing this condition when I first wrote the
tests. There was a bug in apreq_parse_query_string() that disallowed
"=" signs in parameter values. I bet you're linking against
an older, installed version of libapreq instead of one built
from current cvs (the fix to apreq_params.c was applied when
I added the redirect tests last week).
--
Joe Schaefer
[apreq-2] redirect on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
Hi,
There seems to be a problem with the apreq_redirect_test
on Win32 with apreq-2. First off, env/t/request.t gives
the results in the attached t1.txt, with the error log
being e1.txt. The problem here is that no location is
extracted (in e1.txt, there's debug messages from
mod_apreq_redirect_test.c saying "looking for new location",
but no corresponding "redirecting to / ..." twin. If I
apply the following to env/t/request.t:
==========================================================
Index: t/request.t
===================================================================
RCS file: /home/cvs/httpd-apreq-2/env/t/request.t,v
retrieving revision 1.6
diff -u -r1.6 request.t
--- t/request.t 1 Oct 2003 20:00:36 -0000 1.6
+++ t/request.t 11 Oct 2003 01:26:57 -0000
@@ -19,7 +19,7 @@
ok t_cmp(403, GET_RC("/apreq_access_test"), "access denied");
-my $filler = "0123456789" x 6400; # < 64K
+my $filler = "0123456789"; # < 64K
my $body = POST_BODY("/apreq_access_test?foo=1;",
content => "bar=2&quux=$filler;test=6&more=$filler");
ok t_cmp(<<EOT, $body, "prefetch credentials");
@@ -36,10 +36,10 @@
foreach my $location ('/apreq_request_test', '/apreq_access_test') {
ok t_cmp("ARGS:\n\ttest => redirect\n",
- GET_BODY("/apreq_redirect_test?test=ok&location=$location%3Ftest=redirect"),
+ GET_BODY("/apreq_redirect_test?test=ok&location=$location&test=redirect"),
"redirect GET");
- $body = POST_BODY("/apreq_redirect_test?location=$location%3Ffoo=bar", content =>
+ $body = POST_BODY("/apreq_redirect_test?location=$location&foo=bar", content =>
"quux=$filler;test=redirect+with+prefetch;more=$filler");
ok t_cmp(<<EOT, $body, "redirect with prefetch");
============================================================================
(I changed the size of $filler for ease of debugging), then
the results of env/t/request.t occur in t2.txt, with the
error log being e2.txt. In this case the redirect does
happen, but it's just to, eg, /apreq_access_test, without
the rest of the args needed for the tests.
This is with Apache/2.0.47. Does the above suggest anything
to try? Thanks.
--
best regards,
randy
Re: clarification? Re: [VOTE] apreq-2 versioning system
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Stas Bekman <st...@stason.org> writes:
> Joe Schaefer wrote:
> > Stas Bekman <st...@stason.org> writes:
[...]
> >>rename? Do we have already Apache::libapreq?
> > We do.
>
> You mean, in httpd-apreq (1)? I can't find it in httpd-apreq-2:
>
> httpd-apreq-2> find . | grep libapreq.pm
>
> gives nothing.
Sorry- I meant it already exists in httpd-apreq. There's
no equivalent in httpd-apreq-2 yet. My comments related
to Apache::libapreq2 were completely speculative.
--
Joe Schaefer
Re: clarification? Re: [VOTE] apreq-2 versioning system
Posted by Stas Bekman <st...@stason.org>.
Joe Schaefer wrote:
> Stas Bekman <st...@stason.org> writes:
>
>
>>Joe Schaefer wrote:
>>[...]
>>
>>Before I vote, there are a few issues with the perl glue.
>>
>>
>>>for the perl glue-
>>> 1) Apache::Cookie and Apache::Request will be versioned
>>>starting from 2.0. This will likely cause pain for 1.3
>>> users that set their dependency requirements based on
>>> Apache::Request's version instead of libapreq's.
>>
>>hopefully, this generation won't have its versions mismatching the
>>release versions (in 1.x we had 1, 1.1, 1.2),
>
>
> Which did match the release versions for 1.x, didn't they?
>
>
>>whereas here we probably want to have 2.00, 2.01, ... 2.15 etc.
>
>
> To clarify: in 1.x the version numbers for the perl modules always
> matched the *package* release number. So what you're saying is that we
> should stick to this policy, but be sure to use 2.xx (two-digits for
> the minor number) instead? If so, that's fine with me.
Sorry, I wasn't clear what I was talking about. I meant that versioning in the
Changes file. Currently we have in httpd-apreq/Changes:
=item 1.30 - September 27, 2003
libapreq-1.3 is released.
Here the Changes version doesn't match release version, should have been
libapreq-1.30.
>>Also should Apache::Request's version be the only one that has
>>$VERSION and use that for the release version?
>
>
> Do you see an advantage in that? If we're syncing the perl module
> versions with the package release version, I don't see any benefit
> in maintaining that policy for just Request.pm and not Cookie.pm.
> Remember these modules do not depend on one another in apreq-1, nor in
> apreq-2.
Let's say that the libapreq package version is unrelated to either of the .pm
files.
Normally, a version number is not bumped up on each fix, but only during the
release time. So may be the following will work?
Independently for Request.pm and Cookie.pm, bump up each ones version number
just before doing a realy, if and only if, that file has changed from the
previous release? So if Request.pm was at version 2.01 and it hasn't changed
between apreq releases 2.09 and 2.10, it should have the same version as
before. If Cookie.pm was at version 2.05 and was changed several times since
apreq-2.09, its version should be 2.06 when apreq-2.10 is released. Does this
sound good? Or should the version of .pm files be bumped up on each commit to
that file?
Another approach is not to maintain these package numbers at all, instead
require users to work with Apache::libapreq2 which will maintain a single
version number for all .pm files and match libapreq's distro number. I think
that'd be the simplest solution.
>>> 2) Apache::libapreq will be renamed Apache::libapreq2, and should
>>> make the same installation info available that the
>>>apreq2-config script does.
>>
>>rename? Do we have already Apache::libapreq?
>
>
> We do.
You mean, in httpd-apreq (1)? I can't find it in httpd-apreq-2:
httpd-apreq-2> find . | grep libapreq.pm
gives nothing.
>>What's important is that Apache::libapreq2 is needed only for CPAN module
>>dependecies. It shouldn't contain any code and shouldn't be really
>>used in the modules.
>
>
> Right- just like in the 1.x versions, it should be pure perl module just
> to locate config/install data for building other perl modules that want
> to interface with libapreq somehow (roughly equivalent to apreq2-config
> + some additional config info - i.e. typemaps - for reusing the perl
> glue).
>
>
>>Why? Because ideally a program working with libapreq1 should work the
>>same with libapreq2. Similarly, in mod_perl2 we have Apache2.pm, which
>>you can require in MakeMaker for mp2 and Apache.pm for
>>mp1. Incidentally, since mp1 and mp2 aren't compatible each of these
>>modules contain code, but as suggested ideally for apreq it'd be good
>>not to depend on libapreq.pm or libapreq2.pm in the code itself.
>
>
> Yup, +1. The bulk of the perl API of Apache::Request and Apache::Cookie
> should be source compatible with the 1.x versions. However, the matchup
> isn't perfect, and authors that must demand a compatible API (1.x or
> 2.xx) for their application need to be able to do that. Food for
> thought- there may come a time when someone contributes an apache-1.3
> module for libapreq2, in which case folks can use our 2.X API for both
> mp1 and mp2.
sure
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: c-modules cookie test?
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:
> Hi,
> In looking at the libapreq_cgi tests, I wanted
> to test the cookie stuff under mod_apreq, and came
> up with a c-module handler to do that - this is
> attached. The test, under env/t/cookie.t, say, is
> the same one as under glue/perl/t/apreq/cookie.t,
> with the location adjusted to /apreq_cookie_test.
> Would this be of interest adding?
> I also have a c-module request test, based on the
> t/apreq/big_input.t test of httpd-apreq-1, which
> GETs and POSTs some large data.
+1 to all.
--
Joe Schaefer
c-modules cookie test?
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
Hi,
In looking at the libapreq_cgi tests, I wanted
to test the cookie stuff under mod_apreq, and came
up with a c-module handler to do that - this is
attached. The test, under env/t/cookie.t, say, is
the same one as under glue/perl/t/apreq/cookie.t,
with the location adjusted to /apreq_cookie_test.
Would this be of interest adding?
I also have a c-module request test, based on the
t/apreq/big_input.t test of httpd-apreq-1, which
GETs and POSTs some large data.
--
best regards,
randy
Re: clarification? Re: [VOTE] apreq-2 versioning system
Posted by Joe Schaefer <jo...@sunstarsys.com>.
Stas Bekman <st...@stason.org> writes:
> Joe Schaefer wrote:
> [...]
>
> Before I vote, there are a few issues with the perl glue.
>
> > for the perl glue-
> > 1) Apache::Cookie and Apache::Request will be versioned
> > starting from 2.0. This will likely cause pain for 1.3
> > users that set their dependency requirements based on
> > Apache::Request's version instead of libapreq's.
>
> hopefully, this generation won't have its versions mismatching the
> release versions (in 1.x we had 1, 1.1, 1.2),
Which did match the release versions for 1.x, didn't they?
> whereas here we probably want to have 2.00, 2.01, ... 2.15 etc.
To clarify: in 1.x the version numbers for the perl modules always
matched the *package* release number. So what you're saying is that we
should stick to this policy, but be sure to use 2.xx (two-digits for
the minor number) instead? If so, that's fine with me.
> Also should Apache::Request's version be the only one that has
> $VERSION and use that for the release version?
Do you see an advantage in that? If we're syncing the perl module
versions with the package release version, I don't see any benefit
in maintaining that policy for just Request.pm and not Cookie.pm.
Remember these modules do not depend on one another in apreq-1, nor in
apreq-2.
>
> > 2) Apache::libapreq will be renamed Apache::libapreq2, and should
> > make the same installation info available that the
> > apreq2-config script does.
>
> rename? Do we have already Apache::libapreq?
We do.
> What's important is that Apache::libapreq2 is needed only for CPAN module
> dependecies. It shouldn't contain any code and shouldn't be really
> used in the modules.
Right- just like in the 1.x versions, it should be pure perl module just
to locate config/install data for building other perl modules that want
to interface with libapreq somehow (roughly equivalent to apreq2-config
+ some additional config info - i.e. typemaps - for reusing the perl
glue).
> Why? Because ideally a program working with libapreq1 should work the
> same with libapreq2. Similarly, in mod_perl2 we have Apache2.pm, which
> you can require in MakeMaker for mp2 and Apache.pm for
> mp1. Incidentally, since mp1 and mp2 aren't compatible each of these
> modules contain code, but as suggested ideally for apreq it'd be good
> not to depend on libapreq.pm or libapreq2.pm in the code itself.
Yup, +1. The bulk of the perl API of Apache::Request and Apache::Cookie
should be source compatible with the 1.x versions. However, the matchup
isn't perfect, and authors that must demand a compatible API (1.x or
2.xx) for their application need to be able to do that. Food for
thought- there may come a time when someone contributes an apache-1.3
module for libapreq2, in which case folks can use our 2.X API for both
mp1 and mp2.
--
Joe Schaefer