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

Sudheer Vinukonda edited comment on TS-3023 at 8/19/14 6:45 PM:
----------------------------------------------------------------

Sample test output (with the patch) for the below config:

map https://abc.com https://abc.com @plugin=conf_remap.so 
@pparam=proxy.config.http.global_user_agent_header='ABC DEF' 
@pparam=proxy.config.http.global_user_agent_        header=ABC 
@pparam=proxy.config.http.global_user_agent_header="ABC DEF" 
@pparam=proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF

{code}
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Viewing all 
parameters for config line
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 0: 
plugin=conf_remap.so
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 1: 
pparam=proxy.config.http.global_user_agent_header='ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 2: 
pparam=proxy.config.http.global_user_agent_header=ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 3: 
pparam=proxy.config.http.global_user_agent_header="ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 4: 
pparam=proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Viewing 
parsed plugin parameters for /home/y/libexec64/trafficserver/conf_remap.so: [0]
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 0: 
https://dev1.stg.uff.corp.gq1.yahoo.com/
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 1: 
https://www.flickr.com/
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 2: 
proxy.config.http.global_user_agent_header='ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 3: 
proxy.config.http.global_user_agent_header=ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 4: 
proxy.config.http.global_user_agent_header="ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 5: 
proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) argv = 
proxy.config.http.global_user_agent_header='ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) parse_inline 
argv = proxy.config.http.global_user_agent_header='ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) value 'ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) argv = 
proxy.config.http.global_user_agent_header=ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) parse_inline 
argv = proxy.config.http.global_user_agent_header=ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) value ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) argv = 
proxy.config.http.global_user_agent_header="ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) parse_inline 
argv = proxy.config.http.global_user_agent_header="ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) value "ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) argv = 
proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) parse_inline 
argv = proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) value "ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
{code}


was (Author: sudheerv):
Sample test output for the below config:

map https://abc.com https://abc.com @plugin=conf_remap.so 
@pparam=proxy.config.http.global_user_agent_header='ABC DEF' 
@pparam=proxy.config.http.global_user_agent_        header=ABC 
@pparam=proxy.config.http.global_user_agent_header="ABC DEF" 
@pparam=proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF

{code}
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Viewing all 
parameters for config line
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 0: 
plugin=conf_remap.so
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 1: 
pparam=proxy.config.http.global_user_agent_header='ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 2: 
pparam=proxy.config.http.global_user_agent_header=ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 3: 
pparam=proxy.config.http.global_user_agent_header="ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 4: 
pparam=proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Viewing 
parsed plugin parameters for /home/y/libexec64/trafficserver/conf_remap.so: [0]
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 0: 
https://dev1.stg.uff.corp.gq1.yahoo.com/
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 1: 
https://www.flickr.com/
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 2: 
proxy.config.http.global_user_agent_header='ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 3: 
proxy.config.http.global_user_agent_header=ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 4: 
proxy.config.http.global_user_agent_header="ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DEBUG: (url_rewrite) Argument 5: 
proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) argv = 
proxy.config.http.global_user_agent_header='ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) parse_inline 
argv = proxy.config.http.global_user_agent_header='ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) value 'ABC DEF'
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) argv = 
proxy.config.http.global_user_agent_header=ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) parse_inline 
argv = proxy.config.http.global_user_agent_header=ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) value ABC
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) argv = 
proxy.config.http.global_user_agent_header="ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) parse_inline 
argv = proxy.config.http.global_user_agent_header="ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) value "ABC DEF"
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) argv = 
proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) parse_inline 
argv = proxy.config.http.global_user_agent_header="ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
[Aug 19 18:10:25.566] Server {0x2adaa78348e0} DIAG: (conf_remap) value "ABC 
@pparam=proxy.config.http.global_user_agent_header=DEF
{code}

> Support space separated values in inline plugin parameters in remap rules
> -------------------------------------------------------------------------
>
>                 Key: TS-3023
>                 URL: https://issues.apache.org/jira/browse/TS-3023
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: Sudheer Vinukonda
>             Fix For: 5.2.0
>
>         Attachments: TS-3023.diff
>
>
> While reviewing and testing TS-2947, Leif found that, space separated values 
> are not supported correctly for inline plugin params whereas, they work as 
> expected when specified in the config file. 
> For example, 
> @pparam=proxy.config.foo='bar beer' results only in setting 
> proxy.config.foo=bar
> whereas 
> CONFIG proxy.config.foo STRING 'bar beer' results in setting 
> proxy.config.foo='bar beer'
> Further analysis revealed that the limitation is in parsing/tokenizing the 
> input, which always treats space or tab as delimiters, regardless of whether 
> they are included within quotes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to