Geoffrey Young wrote:

-my $location = Apache::TestRequest::module2path($module);
+my $location = '/' . Apache::TestRequest::module2path($module);



The module2path is really there because of win32, which doesn't like paths like /TestApache::cookie. But since we already provide a wrapper, this seems to be ugly:


'/' . Apache::TestRequest::module2path($module);

or at least the name is misleading (I know I gave it that name). So should we probably rename it to be module2segment or something like that, which doesn't suggest that it returns a valid path?

Alternatively fix it to append / internally, though it'll make othe
concatenations uglier:

my $location "http://$hostport$path";;

instead of:

my $location "http://$hostport/$path";;

or does the former look good?


given all the permutations, maybe we need an Apache::URI-like module that accounts for Win32 paths as well.

eh? win32 paths? besides the :: problem there are no win32 paths


my $uri = Apache::TestRequest->parse($module);
$uri->query('env');
$uri->unparse.

if Apache::TestRequest::hostport() returns true, then the unparsed value is an absolute URI, otherwise it's relative.

That sounds as too error-prone to me. What happens if the same test mixes requests to a specific hostport and to the default port as well? We have quite a few tests like this and that logic will break them.


all I suggested is to fix the module2path name not to suggest that it returns a path.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to