[jira] [Updated] (TS-2962) header_rewrite default "exists" matcher not working

2016-08-16 Thread Bryan Call (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Call updated TS-2962:
---
Assignee: Jari Alhonen  (was: Leif Hedstrom)

> header_rewrite default "exists" matcher not working
> ---
>
> Key: TS-2962
> URL: https://issues.apache.org/jira/browse/TS-2962
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 5.0.1
>Reporter: Nick Muerdter
>Assignee: Jari Alhonen
>Priority: Minor
> Fix For: 7.1.0
>
>
> The 
> [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
>  for the header_rewrite plugin indicates that if you don't specify a matcher 
> on a condition, then the matcher checks if a value exists. However, if I'm 
> understanding the intended behavior correctly, this is not the behavior I'm 
> seeing. If I don't specify an explicit matcher on the condition, then the 
> condition never seems to match  (at least for http headers).
> Here's a simplified example in a stock 5.0.1 installation that should add a 
> "{{X-Testing}}" header to the response if the "{{Surrogate-Control}}" header 
> exists on the response:
> {code}
> cond %{READ_RESPONSE_HDR_HOOK}
> cond %{HEADER:Surrogate-Control}
> add-header X-Testing Hello [L]
> {code}
> {code}
> $ curl -I "http://localhost:8081/test;
> HTTP/1.1 200 OK
> X-Powered-By: Express
> Surrogate-Control: max-age=60
> Date: Mon, 28 Jul 2014 06:19:43 GMT
> Age: 0
> Connection: keep-alive
> Server: ATS/5.0.1
> {code}
> But as you can see from this response, no such header is added.
> If I change the condition to a regex match for one or more characters, then 
> the header gets added as I expect:
> {code}
> cond %{READ_RESPONSE_HDR_HOOK}
> cond %{HEADER:Surrogate-Control} /.+/
> add-header X-Testing Hello [L]
> {code}
> {code}
> $ curl -I "http://localhost:8081/test;
> HTTP/1.1 200 OK
> X-Powered-By: Express
> Surrogate-Control: max-age=60
> Date: Mon, 28 Jul 2014 06:19:12 GMT
> X-Testing: Hello
> Age: 0
> Connection: keep-alive
> Server: ATS/5.0.1
> {code}
> The regex based approach works fine, but it took me a while to realize what 
> was going on and figure this out (the primary example in the documentation 
> also seems to be utilizing this "exists" logic so that also doesn't work for 
> me).
> So if the condition without an explicit matcher should check for a variable's 
> existence, that doesn't seem to be working. Alternatively, if the current 
> behavior is working as intended, then I think the documentation and examples 
> might need to be updated (and if that's the case, I'd be happy to take a stab 
> at that).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (TS-2962) header_rewrite default "exists" matcher not working

2016-08-16 Thread Bryan Call (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Call updated TS-2962:
---
Fix Version/s: (was: 7.0.0)
   7.1.0

> header_rewrite default "exists" matcher not working
> ---
>
> Key: TS-2962
> URL: https://issues.apache.org/jira/browse/TS-2962
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 5.0.1
>Reporter: Nick Muerdter
>Assignee: Leif Hedstrom
>Priority: Minor
> Fix For: 7.1.0
>
>
> The 
> [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
>  for the header_rewrite plugin indicates that if you don't specify a matcher 
> on a condition, then the matcher checks if a value exists. However, if I'm 
> understanding the intended behavior correctly, this is not the behavior I'm 
> seeing. If I don't specify an explicit matcher on the condition, then the 
> condition never seems to match  (at least for http headers).
> Here's a simplified example in a stock 5.0.1 installation that should add a 
> "{{X-Testing}}" header to the response if the "{{Surrogate-Control}}" header 
> exists on the response:
> {code}
> cond %{READ_RESPONSE_HDR_HOOK}
> cond %{HEADER:Surrogate-Control}
> add-header X-Testing Hello [L]
> {code}
> {code}
> $ curl -I "http://localhost:8081/test;
> HTTP/1.1 200 OK
> X-Powered-By: Express
> Surrogate-Control: max-age=60
> Date: Mon, 28 Jul 2014 06:19:43 GMT
> Age: 0
> Connection: keep-alive
> Server: ATS/5.0.1
> {code}
> But as you can see from this response, no such header is added.
> If I change the condition to a regex match for one or more characters, then 
> the header gets added as I expect:
> {code}
> cond %{READ_RESPONSE_HDR_HOOK}
> cond %{HEADER:Surrogate-Control} /.+/
> add-header X-Testing Hello [L]
> {code}
> {code}
> $ curl -I "http://localhost:8081/test;
> HTTP/1.1 200 OK
> X-Powered-By: Express
> Surrogate-Control: max-age=60
> Date: Mon, 28 Jul 2014 06:19:12 GMT
> X-Testing: Hello
> Age: 0
> Connection: keep-alive
> Server: ATS/5.0.1
> {code}
> The regex based approach works fine, but it took me a while to realize what 
> was going on and figure this out (the primary example in the documentation 
> also seems to be utilizing this "exists" logic so that also doesn't work for 
> me).
> So if the condition without an explicit matcher should check for a variable's 
> existence, that doesn't seem to be working. Alternatively, if the current 
> behavior is working as intended, then I think the documentation and examples 
> might need to be updated (and if that's the case, I'd be happy to take a stab 
> at that).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (TS-2962) header_rewrite default "exists" matcher not working

2016-04-08 Thread Leif Hedstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-2962:
--
Fix Version/s: (was: 6.2.0)
   7.0.0

> header_rewrite default "exists" matcher not working
> ---
>
> Key: TS-2962
> URL: https://issues.apache.org/jira/browse/TS-2962
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 5.0.1
>Reporter: Nick Muerdter
>Assignee: Leif Hedstrom
>Priority: Minor
> Fix For: 7.0.0
>
>
> The 
> [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
>  for the header_rewrite plugin indicates that if you don't specify a matcher 
> on a condition, then the matcher checks if a value exists. However, if I'm 
> understanding the intended behavior correctly, this is not the behavior I'm 
> seeing. If I don't specify an explicit matcher on the condition, then the 
> condition never seems to match  (at least for http headers).
> Here's a simplified example in a stock 5.0.1 installation that should add a 
> "{{X-Testing}}" header to the response if the "{{Surrogate-Control}}" header 
> exists on the response:
> {code}
> cond %{READ_RESPONSE_HDR_HOOK}
> cond %{HEADER:Surrogate-Control}
> add-header X-Testing Hello [L]
> {code}
> {code}
> $ curl -I "http://localhost:8081/test;
> HTTP/1.1 200 OK
> X-Powered-By: Express
> Surrogate-Control: max-age=60
> Date: Mon, 28 Jul 2014 06:19:43 GMT
> Age: 0
> Connection: keep-alive
> Server: ATS/5.0.1
> {code}
> But as you can see from this response, no such header is added.
> If I change the condition to a regex match for one or more characters, then 
> the header gets added as I expect:
> {code}
> cond %{READ_RESPONSE_HDR_HOOK}
> cond %{HEADER:Surrogate-Control} /.+/
> add-header X-Testing Hello [L]
> {code}
> {code}
> $ curl -I "http://localhost:8081/test;
> HTTP/1.1 200 OK
> X-Powered-By: Express
> Surrogate-Control: max-age=60
> Date: Mon, 28 Jul 2014 06:19:12 GMT
> X-Testing: Hello
> Age: 0
> Connection: keep-alive
> Server: ATS/5.0.1
> {code}
> The regex based approach works fine, but it took me a while to realize what 
> was going on and figure this out (the primary example in the documentation 
> also seems to be utilizing this "exists" logic so that also doesn't work for 
> me).
> So if the condition without an explicit matcher should check for a variable's 
> existence, that doesn't seem to be working. Alternatively, if the current 
> behavior is working as intended, then I think the documentation and examples 
> might need to be updated (and if that's the case, I'd be happy to take a stab 
> at that).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (TS-2962) header_rewrite default "exists" matcher not working

2015-12-16 Thread Leif Hedstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-2962:
--
Fix Version/s: (was: 6.1.0)
   6.2.0

> header_rewrite default "exists" matcher not working
> ---
>
> Key: TS-2962
> URL: https://issues.apache.org/jira/browse/TS-2962
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 5.0.1
>Reporter: Nick Muerdter
>Assignee: Leif Hedstrom
>Priority: Minor
> Fix For: 6.2.0
>
>
> The 
> [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
>  for the header_rewrite plugin indicates that if you don't specify a matcher 
> on a condition, then the matcher checks if a value exists. However, if I'm 
> understanding the intended behavior correctly, this is not the behavior I'm 
> seeing. If I don't specify an explicit matcher on the condition, then the 
> condition never seems to match  (at least for http headers).
> Here's a simplified example in a stock 5.0.1 installation that should add a 
> "{{X-Testing}}" header to the response if the "{{Surrogate-Control}}" header 
> exists on the response:
> {code}
> cond %{READ_RESPONSE_HDR_HOOK}
> cond %{HEADER:Surrogate-Control}
> add-header X-Testing Hello [L]
> {code}
> {code}
> $ curl -I "http://localhost:8081/test;
> HTTP/1.1 200 OK
> X-Powered-By: Express
> Surrogate-Control: max-age=60
> Date: Mon, 28 Jul 2014 06:19:43 GMT
> Age: 0
> Connection: keep-alive
> Server: ATS/5.0.1
> {code}
> But as you can see from this response, no such header is added.
> If I change the condition to a regex match for one or more characters, then 
> the header gets added as I expect:
> {code}
> cond %{READ_RESPONSE_HDR_HOOK}
> cond %{HEADER:Surrogate-Control} /.+/
> add-header X-Testing Hello [L]
> {code}
> {code}
> $ curl -I "http://localhost:8081/test;
> HTTP/1.1 200 OK
> X-Powered-By: Express
> Surrogate-Control: max-age=60
> Date: Mon, 28 Jul 2014 06:19:12 GMT
> X-Testing: Hello
> Age: 0
> Connection: keep-alive
> Server: ATS/5.0.1
> {code}
> The regex based approach works fine, but it took me a while to realize what 
> was going on and figure this out (the primary example in the documentation 
> also seems to be utilizing this "exists" logic so that also doesn't work for 
> me).
> So if the condition without an explicit matcher should check for a variable's 
> existence, that doesn't seem to be working. Alternatively, if the current 
> behavior is working as intended, then I think the documentation and examples 
> might need to be updated (and if that's the case, I'd be happy to take a stab 
> at that).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (TS-2962) header_rewrite default exists matcher not working

2015-06-12 Thread Phil Sorber (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Phil Sorber updated TS-2962:

Fix Version/s: (was: 6.0.0)
   6.1.0

 header_rewrite default exists matcher not working
 ---

 Key: TS-2962
 URL: https://issues.apache.org/jira/browse/TS-2962
 Project: Traffic Server
  Issue Type: Bug
  Components: Plugins
Affects Versions: 5.0.1
Reporter: Nick Muerdter
Assignee: Leif Hedstrom
Priority: Minor
 Fix For: 6.1.0


 The 
 [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
  for the header_rewrite plugin indicates that if you don't specify a matcher 
 on a condition, then the matcher checks if a value exists. However, if I'm 
 understanding the intended behavior correctly, this is not the behavior I'm 
 seeing. If I don't specify an explicit matcher on the condition, then the 
 condition never seems to match  (at least for http headers).
 Here's a simplified example in a stock 5.0.1 installation that should add a 
 {{X-Testing}} header to the response if the {{Surrogate-Control}} header 
 exists on the response:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control}
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:43 GMT
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 But as you can see from this response, no such header is added.
 If I change the condition to a regex match for one or more characters, then 
 the header gets added as I expect:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control} /.+/
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:12 GMT
 X-Testing: Hello
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 The regex based approach works fine, but it took me a while to realize what 
 was going on and figure this out (the primary example in the documentation 
 also seems to be utilizing this exists logic so that also doesn't work for 
 me).
 So if the condition without an explicit matcher should check for a variable's 
 existence, that doesn't seem to be working. Alternatively, if the current 
 behavior is working as intended, then I think the documentation and examples 
 might need to be updated (and if that's the case, I'd be happy to take a stab 
 at that).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (TS-2962) header_rewrite default exists matcher not working

2014-11-19 Thread Leif Hedstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-2962:
--
Fix Version/s: (was: 5.2.0)
   5.3.0

 header_rewrite default exists matcher not working
 ---

 Key: TS-2962
 URL: https://issues.apache.org/jira/browse/TS-2962
 Project: Traffic Server
  Issue Type: Bug
  Components: Plugins
Affects Versions: 5.0.1
Reporter: Nick Muerdter
Assignee: Leif Hedstrom
Priority: Minor
 Fix For: 5.3.0


 The 
 [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
  for the header_rewrite plugin indicates that if you don't specify a matcher 
 on a condition, then the matcher checks if a value exists. However, if I'm 
 understanding the intended behavior correctly, this is not the behavior I'm 
 seeing. If I don't specify an explicit matcher on the condition, then the 
 condition never seems to match  (at least for http headers).
 Here's a simplified example in a stock 5.0.1 installation that should add a 
 {{X-Testing}} header to the response if the {{Surrogate-Control}} header 
 exists on the response:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control}
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:43 GMT
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 But as you can see from this response, no such header is added.
 If I change the condition to a regex match for one or more characters, then 
 the header gets added as I expect:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control} /.+/
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:12 GMT
 X-Testing: Hello
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 The regex based approach works fine, but it took me a while to realize what 
 was going on and figure this out (the primary example in the documentation 
 also seems to be utilizing this exists logic so that also doesn't work for 
 me).
 So if the condition without an explicit matcher should check for a variable's 
 existence, that doesn't seem to be working. Alternatively, if the current 
 behavior is working as intended, then I think the documentation and examples 
 might need to be updated (and if that's the case, I'd be happy to take a stab 
 at that).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (TS-2962) header_rewrite default exists matcher not working

2014-08-01 Thread Leif Hedstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-2962:
--

Fix Version/s: 5.1.0

 header_rewrite default exists matcher not working
 ---

 Key: TS-2962
 URL: https://issues.apache.org/jira/browse/TS-2962
 Project: Traffic Server
  Issue Type: Bug
  Components: Plugins
Affects Versions: 5.0.1
Reporter: Nick Muerdter
Priority: Minor
 Fix For: 5.1.0


 The 
 [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
  for the header_rewrite plugin indicates that if you don't specify a matcher 
 on a condition, then the matcher checks if a value exists. However, if I'm 
 understanding the intended behavior correctly, this is not the behavior I'm 
 seeing. If I don't specify an explicit matcher on the condition, then the 
 condition never seems to match  (at least for http headers).
 Here's a simplified example in a stock 5.0.1 installation that should add a 
 {{X-Testing}} header to the response if the {{Surrogate-Control}} header 
 exists on the response:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control}
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:43 GMT
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 But as you can see from this response, no such header is added.
 If I change the condition to a regex match for one or more characters, then 
 the header gets added as I expect:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control} /.+/
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:12 GMT
 X-Testing: Hello
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 The regex based approach works fine, but it took me a while to realize what 
 was going on and figure this out (the primary example in the documentation 
 also seems to be utilizing this exists logic so that also doesn't work for 
 me).
 So if the condition without an explicit matcher should check for a variable's 
 existence, that doesn't seem to be working. Alternatively, if the current 
 behavior is working as intended, then I think the documentation and examples 
 might need to be updated (and if that's the case, I'd be happy to take a stab 
 at that).



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


[jira] [Updated] (TS-2962) header_rewrite default exists matcher not working

2014-08-01 Thread Alan M. Carroll (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan M. Carroll updated TS-2962:


Fix Version/s: (was: 5.1.0)
   5.2.0

 header_rewrite default exists matcher not working
 ---

 Key: TS-2962
 URL: https://issues.apache.org/jira/browse/TS-2962
 Project: Traffic Server
  Issue Type: Bug
  Components: Plugins
Affects Versions: 5.0.1
Reporter: Nick Muerdter
Assignee: Leif Hedstrom
Priority: Minor
 Fix For: 5.2.0


 The 
 [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
  for the header_rewrite plugin indicates that if you don't specify a matcher 
 on a condition, then the matcher checks if a value exists. However, if I'm 
 understanding the intended behavior correctly, this is not the behavior I'm 
 seeing. If I don't specify an explicit matcher on the condition, then the 
 condition never seems to match  (at least for http headers).
 Here's a simplified example in a stock 5.0.1 installation that should add a 
 {{X-Testing}} header to the response if the {{Surrogate-Control}} header 
 exists on the response:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control}
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:43 GMT
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 But as you can see from this response, no such header is added.
 If I change the condition to a regex match for one or more characters, then 
 the header gets added as I expect:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control} /.+/
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:12 GMT
 X-Testing: Hello
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 The regex based approach works fine, but it took me a while to realize what 
 was going on and figure this out (the primary example in the documentation 
 also seems to be utilizing this exists logic so that also doesn't work for 
 me).
 So if the condition without an explicit matcher should check for a variable's 
 existence, that doesn't seem to be working. Alternatively, if the current 
 behavior is working as intended, then I think the documentation and examples 
 might need to be updated (and if that's the case, I'd be happy to take a stab 
 at that).



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


[jira] [Updated] (TS-2962) header_rewrite default exists matcher not working

2014-07-28 Thread Nick Muerdter (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Muerdter updated TS-2962:
--

Affects Version/s: 5.0.1

 header_rewrite default exists matcher not working
 ---

 Key: TS-2962
 URL: https://issues.apache.org/jira/browse/TS-2962
 Project: Traffic Server
  Issue Type: Bug
  Components: Plugins
Affects Versions: 5.0.1
Reporter: Nick Muerdter

 The 
 [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
  for the header_rewrite plugin indicates that if you don't specify a matcher 
 on a condition, then the matcher checks if a value exists. However, if I'm 
 understanding the intended behavior correctly, this is not the behavior I'm 
 seeing. If I don't specify an explicit matcher on the condition, then the 
 condition never seems to match  (at least for http headers).
 Here's a simplified example in a stock 5.0.1 installation that should add a 
 {{X-Testing}} header to the response if the {{Surrogate-Control}} header 
 exists on the response:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control}
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:43 GMT
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 But as you can see from this response, no such header is added.
 If I change the condition to a regex match for one or more characters, then 
 the header gets added as I expect:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control} /.+/
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:12 GMT
 X-Testing: Hello
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 The regex based approach works fine, but it took me a while to realize what 
 was going on and figure this out (the primary example in the documentation 
 also seems to be utilizing this exists logic so that also doesn't work for 
 me).
 So if the condition without an explicit matcher should check for a variable's 
 existence, that doesn't seem to be working. Alternatively, if the current 
 behavior is working as intended, then I think the documentation and examples 
 might need to be updated (and if that's the case, I'd be happy to take a stab 
 at that).



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


[jira] [Updated] (TS-2962) header_rewrite default exists matcher not working

2014-07-28 Thread Nick Muerdter (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Muerdter updated TS-2962:
--

Priority: Minor  (was: Major)

 header_rewrite default exists matcher not working
 ---

 Key: TS-2962
 URL: https://issues.apache.org/jira/browse/TS-2962
 Project: Traffic Server
  Issue Type: Bug
  Components: Plugins
Affects Versions: 5.0.1
Reporter: Nick Muerdter
Priority: Minor

 The 
 [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
  for the header_rewrite plugin indicates that if you don't specify a matcher 
 on a condition, then the matcher checks if a value exists. However, if I'm 
 understanding the intended behavior correctly, this is not the behavior I'm 
 seeing. If I don't specify an explicit matcher on the condition, then the 
 condition never seems to match  (at least for http headers).
 Here's a simplified example in a stock 5.0.1 installation that should add a 
 {{X-Testing}} header to the response if the {{Surrogate-Control}} header 
 exists on the response:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control}
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:43 GMT
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 But as you can see from this response, no such header is added.
 If I change the condition to a regex match for one or more characters, then 
 the header gets added as I expect:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control} /.+/
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:12 GMT
 X-Testing: Hello
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 The regex based approach works fine, but it took me a while to realize what 
 was going on and figure this out (the primary example in the documentation 
 also seems to be utilizing this exists logic so that also doesn't work for 
 me).
 So if the condition without an explicit matcher should check for a variable's 
 existence, that doesn't seem to be working. Alternatively, if the current 
 behavior is working as intended, then I think the documentation and examples 
 might need to be updated (and if that's the case, I'd be happy to take a stab 
 at that).



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


[jira] [Updated] (TS-2962) header_rewrite default exists matcher not working

2014-07-28 Thread Leif Hedstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-2962:
--

Labels:   (was: crash)

 header_rewrite default exists matcher not working
 ---

 Key: TS-2962
 URL: https://issues.apache.org/jira/browse/TS-2962
 Project: Traffic Server
  Issue Type: Bug
  Components: Plugins
Affects Versions: 5.0.1
Reporter: Nick Muerdter
Priority: Minor

 The 
 [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
  for the header_rewrite plugin indicates that if you don't specify a matcher 
 on a condition, then the matcher checks if a value exists. However, if I'm 
 understanding the intended behavior correctly, this is not the behavior I'm 
 seeing. If I don't specify an explicit matcher on the condition, then the 
 condition never seems to match  (at least for http headers).
 Here's a simplified example in a stock 5.0.1 installation that should add a 
 {{X-Testing}} header to the response if the {{Surrogate-Control}} header 
 exists on the response:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control}
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:43 GMT
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 But as you can see from this response, no such header is added.
 If I change the condition to a regex match for one or more characters, then 
 the header gets added as I expect:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control} /.+/
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:12 GMT
 X-Testing: Hello
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 The regex based approach works fine, but it took me a while to realize what 
 was going on and figure this out (the primary example in the documentation 
 also seems to be utilizing this exists logic so that also doesn't work for 
 me).
 So if the condition without an explicit matcher should check for a variable's 
 existence, that doesn't seem to be working. Alternatively, if the current 
 behavior is working as intended, then I think the documentation and examples 
 might need to be updated (and if that's the case, I'd be happy to take a stab 
 at that).



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


[jira] [Updated] (TS-2962) header_rewrite default exists matcher not working

2014-07-28 Thread Leif Hedstrom (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-2962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leif Hedstrom updated TS-2962:
--

Labels: crash  (was: )

 header_rewrite default exists matcher not working
 ---

 Key: TS-2962
 URL: https://issues.apache.org/jira/browse/TS-2962
 Project: Traffic Server
  Issue Type: Bug
  Components: Plugins
Affects Versions: 5.0.1
Reporter: Nick Muerdter
Priority: Minor

 The 
 [documentation|https://docs.trafficserver.apache.org/en/latest/reference/plugins/header_rewrite.en.html#operands-to-conditions]
  for the header_rewrite plugin indicates that if you don't specify a matcher 
 on a condition, then the matcher checks if a value exists. However, if I'm 
 understanding the intended behavior correctly, this is not the behavior I'm 
 seeing. If I don't specify an explicit matcher on the condition, then the 
 condition never seems to match  (at least for http headers).
 Here's a simplified example in a stock 5.0.1 installation that should add a 
 {{X-Testing}} header to the response if the {{Surrogate-Control}} header 
 exists on the response:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control}
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:43 GMT
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 But as you can see from this response, no such header is added.
 If I change the condition to a regex match for one or more characters, then 
 the header gets added as I expect:
 {code}
 cond %{READ_RESPONSE_HDR_HOOK}
 cond %{HEADER:Surrogate-Control} /.+/
 add-header X-Testing Hello [L]
 {code}
 {code}
 $ curl -I http://localhost:8081/test;
 HTTP/1.1 200 OK
 X-Powered-By: Express
 Surrogate-Control: max-age=60
 Date: Mon, 28 Jul 2014 06:19:12 GMT
 X-Testing: Hello
 Age: 0
 Connection: keep-alive
 Server: ATS/5.0.1
 {code}
 The regex based approach works fine, but it took me a while to realize what 
 was going on and figure this out (the primary example in the documentation 
 also seems to be utilizing this exists logic so that also doesn't work for 
 me).
 So if the condition without an explicit matcher should check for a variable's 
 existence, that doesn't seem to be working. Alternatively, if the current 
 behavior is working as intended, then I think the documentation and examples 
 might need to be updated (and if that's the case, I'd be happy to take a stab 
 at that).



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