[ 
https://issues.apache.org/jira/browse/TS-2269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793367#comment-13793367
 ] 

ASF subversion and git services commented on TS-2269:
-----------------------------------------------------

Commit 4c5fbfa06830ce9167a9be4a1992de22ba753c5e in branch refs/heads/master 
from [~zwoop]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=4c5fbfa ]

Added TS-2269.


> regex_remap plugin has problem handling the case when url path is empty
> -----------------------------------------------------------------------
>
>                 Key: TS-2269
>                 URL: https://issues.apache.org/jira/browse/TS-2269
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Plugins
>            Reporter: Kit Chan
>            Assignee: Leif Hedstrom
>             Fix For: 4.1.0
>
>         Attachments: regex_remap.diff
>
>
> Specifically the block of code is here - 
> https://github.com/apache/trafficserver/blob/master/plugins/regex_remap/regex_remap.cc#L802-806
>   *(match_buf + match_len) = '/';
>   if (req_url.path && req_url.path_len > 0) {
>     memcpy(match_buf + match_len + 1, req_url.path, req_url.path_len);
>     match_len += (req_url.path_len + 1);
>   }
> So if req_url.path is empty (e.g. in the case of http://www.xyx.com/ being 
> the request url), match_len will not increment by 1.
> so e.g. there won't be a match for this case for the regular expression of 
> '^/$'



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to