httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [win32] Locations in Apache-Test framework
Date Fri, 18 Apr 2003 06:28:58 GMT
Stas Bekman wrote:
> Randy Kobes wrote:
> 
>> On Fri, 18 Apr 2003, Stas Bekman wrote:
>>
>>
>>> Stas Bekman wrote:
>>>
>>>> Randy Kobes wrote:
>>>>
>>>>
>>>>> On 14 Apr 2003, Joe Schaefer wrote:
>>>>>
>>>>>
>>>>>> I'd bet apache is just returning a 403 for security purposes,
>>>>>> since ':' is what separates the drive letter from the file path
>>>>>> on Windows. Superman^H^H^H^H^H^HWilliam Rowe probably knows the
>>>>>> full answer, so you might want to take this issue up on
>>>>>> dev@httpd.
>>>>>
>>>>>
>>>>> That looks like it's probably it - there's some discussions in
>>>>> the httpd-dev list that were along these lines. Further to this,
>>>>> a location like
>>>>>   <Location /hello/hell::o>
>>>>>     ....
>>>>>   </Location>
>>>>> does work - what might be happening is Win32 Apache is rejecting,
>>>>> via the 403, anything that looks like a leading drive designation, 
>>>>> for security purposes. 
>>>>
>>>>
>>>> Hmm, is this valid at all on winFU to supply a drive: entry in the 
>>>> URI path? I wonder why Apache can't reject paths with : in the first 
>>>> segment only if virtual mapping have failed.
>>>>
>>>>
>>>>> So it's probably easier to just s!::!-! or s!::!/!, as
>>>>> Stas proposed ... 
>>>>
>>>>
>>>> I think that even though <Location Foo/Bar> is more intuitive,
>>>> <Location Foo-Bar> is less error-prone.
>>>>
>>>> I think <Location Foo/Bar> is potentially error-prone, since if one

>>>> of the test package is 'Foo' we will have a location <Location Foo>

>>>> and then we will get merging with <Location Foo/Bar> something that

>>>> could be undesired.
>>>
>>>
>>> I think that at the end I'm simply going to install a default
>>> TransHandler, semi-transparent to the developer (put it into
>>> the autogenerated httpd.conf), rather than change the URLs.
>>
>>
>>
>> That's certainly the most straightforward thing to do, and less
>> subject to introducing new bugs. One downside though is that if
>> people use the mod_perl tests as a basis for their own
>> installations (which, given the extensive nature, is a wonderful
>> source of examples), they might not realize that it's this
>> TransHandler that makes such locations with ':' in their names
>> work on Win32. And getting 403s isn't the most intuitive error to
>> track down ....
>>
>> I'd be willing to go through the mod_perl 2 tests and track
>> the changes needed to s/::/-/, if that'd be useful ....
> 
> 
> Thank you, Randy!
> 
> Doug suggests to rename as well, though to do it similar to XS naming 
> convention so we would do s/::/__/.
> 
> I'll take care of the renaming.
> 
> I'll also remove the workaround afterwards.
> 
> Joe, that means that apreq tests need to be updated as well.

Joe, this is the patch that needs to be applied after you 'cvs up' your 
Apache-Test dir. I didn't commit it since I can't test it at this moment, 
because I can't build httpd-apreq (will look at it later)

Index: t/apreq/big_input.t
===================================================================
RCS file: /home/cvs/httpd-apreq/t/apreq/big_input.t,v
retrieving revision 1.1
diff -u -r1.1 big_input.t
--- t/apreq/big_input.t	5 Apr 2002 19:42:20 -0000	1.1
+++ t/apreq/big_input.t	18 Apr 2003 06:26:24 -0000
@@ -8,7 +8,7 @@
  use Apache::TestUtil;
  use Apache::TestRequest qw(GET_BODY POST_BODY);

-my $location = "/TestApReq::big_input";
+my $location = "/TestApReq__big_input";

  my @key_len = (5, 100, 305);
  my @key_num = (5, 15, 26);
Index: t/apreq/cookie.t
===================================================================
RCS file: /home/cvs/httpd-apreq/t/apreq/cookie.t,v
retrieving revision 1.1
diff -u -r1.1 cookie.t
--- t/apreq/cookie.t	5 Apr 2002 19:42:20 -0000	1.1
+++ t/apreq/cookie.t	18 Apr 2003 06:26:24 -0000
@@ -9,7 +9,7 @@

  plan tests => 1;

-my $location = "/TestApReq::cookie";
+my $location = "/TestApReq__cookie";

  {
      # basic param() test
Index: t/apreq/inherit.t
===================================================================
RCS file: /home/cvs/httpd-apreq/t/apreq/inherit.t,v
retrieving revision 1.1
diff -u -r1.1 inherit.t
--- t/apreq/inherit.t	5 Apr 2003 23:29:37 -0000	1.1
+++ t/apreq/inherit.t	18 Apr 2003 06:26:24 -0000
@@ -7,7 +7,7 @@
  use Apache::TestRequest qw(GET_BODY UPLOAD_BODY);

  plan tests => 1;
-my $location = "/TestApReq::inherit";
+my $location = "/TestApReq__inherit";
  ok t_cmp(<< 'VALUE', GET_BODY($location), "inheritance");
  method => GET
  VALUE
Index: t/apreq/request.t
===================================================================
RCS file: /home/cvs/httpd-apreq/t/apreq/request.t,v
retrieving revision 1.1
diff -u -r1.1 request.t
--- t/apreq/request.t	5 Apr 2002 19:42:20 -0000	1.1
+++ t/apreq/request.t	18 Apr 2003 06:26:24 -0000
@@ -8,7 +8,7 @@

  plan tests => 2;

-my $location = "/TestApReq::request";
+my $location = "/TestApReq__request";
  #print GET_BODY $location;

  {


__________________________________________________________________
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


Mime
View raw message