You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mladen Turk <mt...@mappingsoft.com> on 2002/10/18 20:52:54 UTC

[PROPOSAL] JK2 uriMap using native regex

Hi,

I've posted a uriMap code that matches uri's using regular expressions
couple of weeks ago.
There was a consensus that we need to wait until 2.1 and eventually that
we use the regex from APR (if it ever will be there).

Ok, so I'm proposing that we make our own regex code (?).
Why?

1. Apache2 has pcre.lib and pcreposix.lib as a part of standard
distribution
2. Apache1.3.x has a regex.lib
3. For IIS we may use the standard pcre-3.9 or the one from Apache2
(they are the same)
4. Most unixes has pcre or regex as part of standard distribution.
5. If ever pcre gets to the APR we may use that one like any other.

So, we will need single file with jk2_regex_compile, jk2_regex_match and
will be able to use any of the upper combinations?

Thoughts? 

MT.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [PROPOSAL] JK2 uriMap using native regex

Posted by Costin Manolache <cm...@yahoo.com>.
Mladen Turk wrote:

> 
> 
>> -----Original Message-----
>> From: Henri Gomez
>> > 
>> > I would rather pick one and use it, and deal with the build
>> problems.
>> > Probably we should just use what apache uses, it seems like
>> a reusable
>> > piece of code.
>> > 
>> > Other opinions ?
>> 
>> We should use a regexp implementation which use a synthax
>> similar to the one in Apache 1.3/2.0. And as for APR/SHM,
>> make it build/run conditional if possible.
>> 
> 
> We can use the regex that comes with Apache2, but I've been said that
> this is a modified pcre-3.9. Think that only modifications are about
> performance for small size matches (already in the pcre-3.92 test
> release), so that shouldn't be such a problem.
> 
> The implementation will be conditional having bean name 'urix'
> (negotiable ;), using the same 'uri' factory. That way all the
> configuration will still work, but the urix will be favored over the
> normal uri directives.

+1

BTW, I have a feeling this already works for httpd.conf-based
configuration ( i.e JkSet in <Location> ). And it is the 
best solution to use the same regexp package that apache is using
and make this behavior portable across servers and consistent
for 'native' and workers.conf-style config.

-- 
Costin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [PROPOSAL] JK2 uriMap using native regex

Posted by Mladen Turk <mt...@mappingsoft.com>.

> -----Original Message-----
> From: Henri Gomez
> > 
> > I would rather pick one and use it, and deal with the build 
> problems. 
> > Probably we should just use what apache uses, it seems like 
> a reusable 
> > piece of code.
> > 
> > Other opinions ?
> 
> We should use a regexp implementation which use a synthax 
> similar to the one in Apache 1.3/2.0. And as for APR/SHM, 
> make it build/run conditional if possible.
> 

We can use the regex that comes with Apache2, but I've been said that
this is a modified pcre-3.9. Think that only modifications are about
performance for small size matches (already in the pcre-3.92 test
release), so that shouldn't be such a problem.

The implementation will be conditional having bean name 'urix'
(negotiable ;), using the same 'uri' factory. That way all the
configuration will still work, but the urix will be favored over the
normal uri directives.



MT.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PROPOSAL] JK2 uriMap using native regex

Posted by Henri Gomez <hg...@apache.org>.
Costin Manolache wrote:
> Something like that was discussed on commons ( I think ).
> 
> The problem seems to be that different regex packages use 
> different rules ( Perl-like, etc ), there is not standard
> syntax for regexp.
> 
> That means the behavior would be dependent on which regexp
> engine is used. 
> 
> I would rather pick one and use it, and deal with the build
> problems. Probably we should just use what apache uses, it
> seems like a reusable piece of code.
> 
> Other opinions ?

We should use a regexp implementation which use a synthax
similar to the one in Apache 1.3/2.0. And as for APR/SHM,
make it build/run conditional if possible.





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PROPOSAL] JK2 uriMap using native regex

Posted by Costin Manolache <cm...@yahoo.com>.
Something like that was discussed on commons ( I think ).

The problem seems to be that different regex packages use 
different rules ( Perl-like, etc ), there is not standard
syntax for regexp.

That means the behavior would be dependent on which regexp
engine is used. 

I would rather pick one and use it, and deal with the build
problems. Probably we should just use what apache uses, it
seems like a reusable piece of code.

Other opinions ?


Costin 

Mladen Turk wrote:

> Hi,
> 
> I've posted a uriMap code that matches uri's using regular expressions
> couple of weeks ago.
> There was a consensus that we need to wait until 2.1 and eventually that
> we use the regex from APR (if it ever will be there).
> 
> Ok, so I'm proposing that we make our own regex code (?).
> Why?
> 
> 1. Apache2 has pcre.lib and pcreposix.lib as a part of standard
> distribution
> 2. Apache1.3.x has a regex.lib
> 3. For IIS we may use the standard pcre-3.9 or the one from Apache2
> (they are the same)
> 4. Most unixes has pcre or regex as part of standard distribution.
> 5. If ever pcre gets to the APR we may use that one like any other.
> 
> So, we will need single file with jk2_regex_compile, jk2_regex_match and
> will be able to use any of the upper combinations?
> 
> Thoughts?
> 
> MT.

-- 
Costin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>