Ah, what do you get as a response? a path like /tmp/foo.pl on win32? In which case the problem would be coming from:
$_[0]->{FILENAME} = $_[1]->filename;
in RegistryCooker.pm, which sets $0, eventually printed by cgi-bin/basic.pl. Does $r->filename return a unix path on winFU?
So does it do that? I suppose that it does...
I guess one could look at it from both ends ... I was thinking here that the problem was in the way that $script_file was constructed with catfile, which on Win32 came out as SERVER_ROOT\cgi-bin\basic.pl. So the patch above changes this to SERVER_ROOT/cgi-bin/basic.pl, which agrees with the response.
Yes, but $script_file is a fs path, not URL. I'm not questioning the correctness of your patch, Randy, it just looks like you are workaround a problem that's coming from $r->filename. Is it possible that it may return the \ paths as well?
[...]Further to this, I think most people on Win32 (and probably all non-Unices) are used to using '/' as a directory separator when inside a web environment (eg, in constructing urls). So I would think that SERVER_ROOT/cgi-bin/basic.pl is the correct cross-platform value ...
However (I hate bringing this up :(, on Win32 there's problems with sometimes the dos short path name being used and then compared with the long path name (eg, MODPER~1.0 vs modperl-2.0). This in principle is what needs to be done to get t/basic.t and t/redirect.t to pass under ModPerl-Registry:
-my $script_file = catfile $vars->{serverroot}, 'cgi-bin', 'basic.pl';
+my $script_file = File::Spec::Unix->catfile($vars->{serverroot}, 'cgi-bin',
'basic.pl');
This looks absolutely unintuitive and requires a comment in every place you use it. Therefore you are probably better off with your original patch to do an explicit: join "/n", ...
+$script_file = Win32::GetLongPathName($script_file) + if Apache::TestConfig::WIN32;
Yes, it's ugly and those of us coding on unix will never remember to do that, leaving you with the boring cleanup job. Therefore please think of extending Apache::TestXXX API to have this Win32::GetLongPathName part hidden within. Both join "/", .. and Win32::GetLongPathName can go inside. e.g. catfile_normalized() and caturl_normalized()? where any post-processings like Win32::GetLongPathName will come from the _normalized part? I'm not sure if the name selection is good. Does it sound good?
__________________________________________________________________ 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]
