You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Manjesh Nilange (JIRA)" <ji...@apache.org> on 2009/12/09 02:16:18 UTC

[jira] Created: (TS-80) Support regular expressions in the host fields of remap rules

Support regular expressions in the host fields of remap rules
-------------------------------------------------------------

                 Key: TS-80
                 URL: https://issues.apache.org/jira/browse/TS-80
             Project: Traffic Server
          Issue Type: New Feature
          Components: Core
    Affects Versions: 2.0a
            Reporter: Manjesh Nilange
            Priority: Minor
             Fix For: 2.0a


Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Manjesh Nilange (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manjesh Nilange updated TS-80:
------------------------------

    Attachment: regex-support-final.patch

Final version of the patch. Changes:

1) Public methods changed to conform to convention
2) Doing away with non-failure goto labels; using multiple returns instead

> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0a
>
>         Attachments: regex-support-coding-style.patch, regex-support-final.patch, regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Manjesh Nilange (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manjesh Nilange updated TS-80:
------------------------------

    Attachment: regex-support.patch

This is a proposed implementation of the described feature. The implementation uses pcre to compile and execute regular expressions and requires rules with regexes to be be prefixed by 'regex_' in remap.config

> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0a
>
>         Attachments: regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Eric Balsa (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790561#action_12790561 ] 

Eric Balsa commented on TS-80:
------------------------------

Seems like a useful addition. Can you include a wiki entry for the new feature and provide some example config & use cases?

> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0a
>
>         Attachments: regex-support-coding-style.patch, regex-support-final.patch, regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Manjesh Nilange (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790869#action_12790869 ] 

Manjesh Nilange commented on TS-80:
-----------------------------------

Leif, you are right. The pcre.h check result is not being used later. It should be fine to remove it.


> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0a
>
>         Attachments: regex-support-coding-style.patch, regex-support-final.patch, regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Manjesh Nilange (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790878#action_12790878 ] 

Manjesh Nilange commented on TS-80:
-----------------------------------

I feel the ideal place for documentation would be in the admin guide.
I've mentioned a few things in the comments section of remap.config for
the time being. I'll figure out how to add this to the admin guide.


> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0a
>
>         Attachments: regex-support-coding-style.patch, regex-support-final.patch, regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Manjesh Nilange (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792739#action_12792739 ] 

Manjesh Nilange commented on TS-80:
-----------------------------------

I've forwarded some text describing this feature to Diane who should be checking in the changes soon enough.

> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0.0a
>
>         Attachments: regex-support-coding-style.patch, regex-support-final.patch, regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom resolved TS-80.
-----------------------------

    Resolution: Fixed

Checked in.

> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0.0a
>
>         Attachments: regex-support-coding-style.patch, regex-support-final.patch, regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790550#action_12790550 ] 

Leif Hedstrom commented on TS-80:
---------------------------------

Latest changes look good, r=leif (but see question below).

Tested on FC9 and Ubuntu 9.10 (Ubuntu needs libpcre3-dev).

One question though: We fail if PCRE isn't available, so why even have the define  for HAS_PCRE_H (i.e. the check for pcre.h)? Not that it hurts, but the check for libpcre ought to be enough I'd think? Unless there's a reason for the check on pcre.h, I'd recommend removing it (and I checked, the patch does not use the HAS_PCRE_H define that the check produces).

-- Leif

This is the part of the diff I'm talking about:

 if test "$ac_cv_func_epoll_ctl" = "yes"; then
@@ -509,6 +514,7 @@
                   stropts.h \
                   sys/mount.h \
                   sys/param.h \
+                  pcre.h \
                   ], [], [])


> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0a
>
>         Attachments: regex-support-coding-style.patch, regex-support-final.patch, regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-80) Support regular expressions in the host fields of remap rules

Posted by "Manjesh Nilange (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Manjesh Nilange updated TS-80:
------------------------------

    Attachment: regex-support-coding-style.patch

Patch previously attached but with coding style applied - there are no other changes.

> Support regular expressions in the host fields of remap rules
> -------------------------------------------------------------
>
>                 Key: TS-80
>                 URL: https://issues.apache.org/jira/browse/TS-80
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.0a
>            Reporter: Manjesh Nilange
>            Priority: Minor
>             Fix For: 2.0a
>
>         Attachments: regex-support-coding-style.patch, regex-support.patch
>
>
> Currently, the remap rules cannot have regular expressions in the host fields. Even though regular expressions are supported by the regex_remap plugin for the path and query fields, we need this support in the host field too. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.