You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/03/22 12:48:30 UTC

DO NOT REPLY [Bug 48956] New: SSI regular expressions not working

https://issues.apache.org/bugzilla/show_bug.cgi?id=48956

           Summary: SSI regular expressions not working
           Product: Tomcat 6
           Version: 6.0.26
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: altumano@gmail.com


I was trying to use Tomcat SSI filter:

http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html

While it generally works, I have discovered that SSI regular expressions are
not supported.
As much as I can see from tomcat source code, this feature is just not
implemented.

For example, those expressions always return "did not match":

<!--#if expr="abc = /abc/" -->matches<!--#else -->did not match<!--#endif -->

<!--#if expr="abc = /[a-z]/" -->matches<!--#else -->did not match<!--#endif -->

This bug is a showstopper for me, because in my application I need SSI regular
expressions support.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 48956] SSI regular expressions not working

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48956

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Konstantin Kolinko <kn...@gmail.com> ---
(In reply to comment #3)
I think I understood what you are asking for.
It is a separate issue, so I filed it separately -> bug 53387

I am re-closing this issue as FIXED.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 48956] SSI regular expressions not working

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48956

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Mark Thomas <ma...@apache.org> 2011-06-15 22:43:30 UTC ---
Fixed in 7.0.x and will be included in 7.0.17 onwards.

I don't see this being back-ported to 6.0.x or 5.5.x.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 48956] SSI regular expressions not working

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48956

Hipnosis <mh...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #3 from Hipnosis <mh...@hotmail.com> ---
Hi, I found a bug working with Tomcat, SSI and regular expression that is still
unresolved and my work is essential for proper operation:

For example:
<!--#set var="aux" value="aa12" -->
<!--#if expr="$aux=/^aa([a-zA-Z0-9\-_]*)/" -->
        <!--#set var="aux2" value="$1" -->
<!--#endif -->

Resulting value:<!--#echo var="aux2" -->


In a html file works correctly, but when working on Tomcat, a complex regular
expression fails, and the page returns nothing from it.

Regards and await your response.

-- 
You are receiving this mail because:
You are the assignee for the bug.

DO NOT REPLY [Bug 48956] SSI regular expressions not working

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48956

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |enhancement

--- Comment #1 from Mark Thomas <ma...@apache.org> 2010-03-22 17:11:42 UTC ---
Patches for enhancement requests are always welcome

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 48956] SSI regular expressions not working

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48956

--- Comment #4 from Konstantin Kolinko <kn...@gmail.com> ---
(In reply to comment #3)
> Hi, I found a bug working with Tomcat, SSI and regular expression that is
> still unresolved and my work is essential for proper operation:

I do not understand your description. What do you mean by "fails" and what do
you mean by "returns nothing"?

Please provide:

1. What are the steps to reproduce your problem

2. What is the actual behaviour that you are observing.

3. What do you expect the correct behaviour to be.

=======================================
By the way:

1. The actual implementation Regexp matching is in
 org/apache/catalina/ssi/ExpressionParseTree.java,
 in method compareBranches()

2. The feature was implemented by r1136231 and r1136399
3. r1136399 was result of discussion in "Re: r1136231" thread on dev@. In
archives:
http://markmail.org/message/g6ba77x7abkhibnn
http://marc.info/?t=130817798400003&r=1&w=2

4. If you can provide a patch for ExpressionParseTree#compareBranches(), it
would be faster.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org