[
https://issues.apache.org/jira/browse/TS-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15076204#comment-15076204
]
Hiroaki Nakamura commented on TS-4106:
--------------------------------------
Sorry for my bad English.
You can input multiple URLs separated new lines in the textarea of the four
forms below of Cache Inspector:
* Delete url
* Regex lookup
* Regex delete
* Regex invalidate
How to reproduce the problem:
1. Enable the debug log and add cache_inspector to debug tags.
/etc/trafficserver/records.config
CONFIG proxy.config.diags.debug.enabled INT 1
CONFIG proxy.config.diags.debug.tags STRING http.*|dns.*|cache_inspector.*
2. Input the following two lines in the Regex invalidate form.
http://.*\.js
http://.*\.jpg
3. See /var/log/trafficserver/traffic.out
/var/log/trafficserver/traffic.out
[Dec 31 20:49:25.677] Server {0x2b45e18837a0} DEBUG: (cache_inspector) query
params: 'url=http%3A%2F%2F.*%5C.js%0D%0Ahttp%3A%2F%2F.*%5C.jpg' len 33
[unescaped]
[Dec 31 20:49:25.677] Server {0x2b45e18837a0} DEBUG: (cache_inspector) query
params: 'url=http://.*\.js
http://.*\.jpg' len 33 [escaped]
[Dec 31 20:49:25.677] Server {0x2b45e18837a0} DEBUG: (cache_inspector) there
were 1 url(s) passed in
[Dec 31 20:49:25.677] Server {0x2b45e18837a0} DEBUG: (cache_inspector) URL 1:
'http%3A%2F%2F.*%5C.js%0D%0Ahttp%3A%2F%2F.*%5C.jpg'
[Dec 31 20:49:25.677] Server {0x2b45e18837a0} DEBUG: (cache_inspector) URL 1:
'http://.*\.js
http://.*\.jpg'
[Dec 31 20:49:25.677] Server {0x2b45e18837a0} DEBUG: (cache_inspector) URL 2:
'http%3A%2F%2F.*%5C.jpg'
[Dec 31 20:49:25.677] Server {0x2b45e18837a0} DEBUG: (cache_inspector) URL 2:
'http://.*\.jpg'
Note URL 1 is 'http://.*\.js
http://.*\.jpg'. It should be 'http://.*\.js'
> Cache Inspector fails to split multiline URLs
> ---------------------------------------------
>
> Key: TS-4106
> URL: https://issues.apache.org/jira/browse/TS-4106
> Project: Traffic Server
> Issue Type: Bug
> Components: Web UI
> Reporter: Hiroaki Nakamura
> Assignee: Leif Hedstrom
> Fix For: 6.1.0
>
> Attachments: cache_inspector_multiline_urls_split.patch
>
>
> The error is in the length parameter at
> https://github.com/apache/trafficserver/blob/413dd51d5dc17bf388805071efdb8f882014b847/iocore/cache/CachePages.cc#L129
> Because of this error, ink_strlcpy copies strings from the current poisition
> to the end of multiline URLs, not to the end of line.
> The attached patch cache_inspector_multiline_urls_split.patch fixes this bug.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)