Re: cvs commit: apache-1.3/src/modules/standard mod_rewrite.c

2003-04-03 Thread André Malo
* Jim Jagielski wrote:

> At 9:11 PM + 4/2/03, [EMAIL PROTECTED] wrote:
>>  @@ -2067,12 +2098,12 @@
>>   splitout_queryargs(r, p->flags & RULEFLAG_QSAPPEND);
>>
>>   /*
>>  - *   Again add the previously stripped per-directory location
>>  - *   prefix if the new URI is not a new one for this
>>  - *   location, i.e. if it's not starting with either a slash
>>  - *   or a fully qualified URL scheme.
>>  + *  Add the previously stripped per-directory location
>>  + *  prefix if the new URI is not a new one for this
>>  + *  location, i.e. if it's not an absolute URL (!) path nor
>>  + *  a fully qualified URL scheme.
>>*/
>>  -if (prefixstrip && !ap_os_is_path_absolute(r->filename)
>>  +if (prefixstrip && *r->filename != '/'
>>  && !is_absolute_uri(r->filename)) {
>>   rewritelog(r, 3, "[per-dir %s] add per-dir prefix: %s -> %s%s",
>>  perdir, r->filename, perdir, r->filename);
>>
> Is that right?? We aren't bothering to check
> !ap_os_is_path_absolute(r->filename) anymore?

At this stage: yes.

prefixstrip is only true in directory context, where you have the 
possibilities:

(1) RewriteRule foo bar
(2) RewriteRule foo /baz
(3) RewriteRule foo http://elsewhere

checking ap_os_is_path_absolute(r->filename) was totally useless, because 
it's first added when the condition (1) is true (i.e. after this check).

(That's what I meant with confusion between local paths and url paths ... 
;-)

nd
-- 
Gib' mal folgendes in die Kommandozeile ein (und einen Moment warten):

net send localhost "Buuuh!"
Na, erschreckt?  -- Markus Becker in mpdsh


Re: cvs commit: apache-1.3/src/modules/standard mod_rewrite.c

2003-04-03 Thread Jim Jagielski
At 9:11 PM + 4/2/03, [EMAIL PROTECTED] wrote:
>  @@ -2067,12 +2098,12 @@
>   splitout_queryargs(r, p->flags & RULEFLAG_QSAPPEND);
>  
>   /*
>  - *   Again add the previously stripped per-directory location
>  - *   prefix if the new URI is not a new one for this
>  - *   location, i.e. if it's not starting with either a slash
>  - *   or a fully qualified URL scheme.
>  + *  Add the previously stripped per-directory location
>  + *  prefix if the new URI is not a new one for this
>  + *  location, i.e. if it's not an absolute URL (!) path nor
>  + *  a fully qualified URL scheme.
>*/
>  -if (prefixstrip && !ap_os_is_path_absolute(r->filename)
>  +if (prefixstrip && *r->filename != '/'
>   && !is_absolute_uri(r->filename)) {
>   rewritelog(r, 3, "[per-dir %s] add per-dir prefix: %s -> %s%s",
>  perdir, r->filename, perdir, r->filename);
> 
> 
> 

Is that right?? We aren't bothering to check
!ap_os_is_path_absolute(r->filename) anymore?

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "A society that will trade a little liberty for a little order
 will lose both and deserve neither" - T.Jefferson


Re: cvs commit: apache-1.3/src/modules/standard mod_rewrite.c

2002-05-29 Thread William A. Rowe, Jr.


>martin  02/05/29 10:39:23
>
>   Modified:src  CHANGES
>src/modules/standard mod_rewrite.c
>   Log:
>   Fix a problem in mod_rewrite which would lead to 400 Bad Request
>   responses for rewriting rules which resulted in a local path.

It seems I did in fact transpose the tests... good call and thank you
for your good eyes in resolving this bug.

Bill





Re: cvs commit: apache-1.3/src/modules/standard mod_rewrite.c

2002-05-29 Thread Cliff Woolley

On Wed, 29 May 2002, Martin Kraemer wrote:

> In 2.0, they were correct since 21-Oct-01 already.
>
> Although this was a hasty 1.3.25 commit, I think I did the Right Thing.

+1 ... you might want to have a **warning** in the CHANGES entry since
this could break old (incorrect) configs that worked by magic before.
Typically it should be because a rule that was missing the [PT] flag
magically worked before.

--Cliff




Re: cvs commit: apache-1.3/src/modules/standard mod_rewrite.c

2002-05-29 Thread Martin Kraemer

On Wed, May 29, 2002 at 05:39:24PM -, [EMAIL PROTECTED] wrote:
>   Fix a problem in mod_rewrite which would lead to 400 Bad Request
>   responses for rewriting rules which resulted in a local path.
>
>   diff -u -r1.176 -r1.177

I hand-checked the other changes that had sneaked into rev 1.176; only
the two invocations of ap_os_is_path_absolute() were incorrect.

In 2.0, they were correct since 21-Oct-01 already.

Although this was a hasty 1.3.25 commit, I think I did the Right Thing.

   Martin
-- 
<[EMAIL PROTECTED]> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany



Re: cvs commit: apache-1.3/src/modules/standard mod_rewrite.c

2002-05-29 Thread Cliff Woolley

On 29 May 2002 [EMAIL PROTECTED] wrote:

> martin  02/05/29 10:39:23
>
>   Modified:src  CHANGES
>src/modules/standard mod_rewrite.c
>   Log:
>   Fix a problem in mod_rewrite which would lead to 400 Bad Request
>   responses for rewriting rules which resulted in a local path.
>

AHA!!!  That would explain why I just yesterday had to close a bug report
on 2.0 which complained about some (invalid) config that "worked" under
1.3 causing 400's under 2.0.  I didn't understand how it could have ever
worked under 1.3, but I didn't actually go look.  Having that conditional
backwards in 1.3 would definitely explain it.  :))

Good catch.

--Cliff