[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=31026=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31026
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 25/Oct/16 05:44
Start Date: 25/Oct/16 05:44
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1133
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/966/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31026)
Time Spent: 1h 40m  (was: 1.5h)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[GitHub] trafficserver issue #1133: TS-4993: Disables escaping and quotes inside rege...

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1133
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/966/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=31025=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31025
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 25/Oct/16 05:40
Start Date: 25/Oct/16 05:40
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1133
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1074/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31025)
Time Spent: 1.5h  (was: 1h 20m)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[GitHub] trafficserver issue #1133: TS-4993: Disables escaping and quotes inside rege...

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1133
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1074/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4997) Move C++ API to plugins.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4997?focusedWorklogId=31023=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31023
 ]

ASF GitHub Bot logged work on TS-4997:
--

Author: ASF GitHub Bot
Created on: 25/Oct/16 04:09
Start Date: 25/Oct/16 04:09
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/965/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31023)
Time Spent: 1h 50m  (was: 1h 40m)

> Move C++ API to plugins.
> 
>
> Key: TS-4997
> URL: https://issues.apache.org/jira/browse/TS-4997
> Project: Traffic Server
>  Issue Type: Task
>  Components: CPP API
>Reporter: James Peach
>Assignee: James Peach
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Move the C++ API to the {{plugins}} directory. Although the C++ API is a 
> dependency of some plugins, it is itself a consumer of the TS plugin API, so 
> the best place from a build ordering POV is {{plugins}}.



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


[GitHub] trafficserver issue #1134: TS-4997: Move the C++ API to lib/cppapi.

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/965/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1134: TS-4997: Move the C++ API to lib/cppapi.

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1073/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4997) Move C++ API to plugins.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4997?focusedWorklogId=31022=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31022
 ]

ASF GitHub Bot logged work on TS-4997:
--

Author: ASF GitHub Bot
Created on: 25/Oct/16 04:05
Start Date: 25/Oct/16 04:05
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1073/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31022)
Time Spent: 1h 40m  (was: 1.5h)

> Move C++ API to plugins.
> 
>
> Key: TS-4997
> URL: https://issues.apache.org/jira/browse/TS-4997
> Project: Traffic Server
>  Issue Type: Task
>  Components: CPP API
>Reporter: James Peach
>Assignee: James Peach
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Move the C++ API to the {{plugins}} directory. Although the C++ API is a 
> dependency of some plugins, it is itself a consumer of the TS plugin API, so 
> the best place from a build ordering POV is {{plugins}}.



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


[jira] [Work logged] (TS-4997) Move C++ API to plugins.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4997?focusedWorklogId=31021=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31021
 ]

ASF GitHub Bot logged work on TS-4997:
--

Author: ASF GitHub Bot
Created on: 25/Oct/16 02:48
Start Date: 25/Oct/16 02:48
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
I'll make a new PR that moves it to ``lib/cppapi``. This isn't ideal, but 
it removes the unnecessary ``src`` directory and we can probably agree on it :)


Issue Time Tracking
---

Worklog Id: (was: 31021)
Time Spent: 1.5h  (was: 1h 20m)

> Move C++ API to plugins.
> 
>
> Key: TS-4997
> URL: https://issues.apache.org/jira/browse/TS-4997
> Project: Traffic Server
>  Issue Type: Task
>  Components: CPP API
>Reporter: James Peach
>Assignee: James Peach
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Move the C++ API to the {{plugins}} directory. Although the C++ API is a 
> dependency of some plugins, it is itself a consumer of the TS plugin API, so 
> the best place from a build ordering POV is {{plugins}}.



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


[GitHub] trafficserver issue #1134: TS-4997: Move C++ API to plugins.

2016-10-24 Thread jpeach
Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
I'll make a new PR that moves it to ``lib/cppapi``. This isn't ideal, but 
it removes the unnecessary ``src`` directory and we can probably agree on it :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread James Peach (JIRA)

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

James Peach resolved TS-4998.
-
   Resolution: Fixed
 Assignee: James Peach
Fix Version/s: 7.1.0

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
>Assignee: James Peach
> Fix For: 7.1.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[jira] [Work logged] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4998?focusedWorklogId=31020=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31020
 ]

ASF GitHub Bot logged work on TS-4998:
--

Author: ASF GitHub Bot
Created on: 25/Oct/16 02:03
Start Date: 25/Oct/16 02:03
Worklog Time Spent: 10m 
  Work Description: Github user jpeach closed the pull request at:

https://github.com/apache/trafficserver/pull/1135


Issue Time Tracking
---

Worklog Id: (was: 31020)
Time Spent: 1h 20m  (was: 1h 10m)

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
> Fix For: 7.1.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[GitHub] trafficserver pull request #1135: TS-4998: Move plugins into a common non-re...

2016-10-24 Thread jpeach
Github user jpeach closed the pull request at:

https://github.com/apache/trafficserver/pull/1135


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4998?focusedWorklogId=31017=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31017
 ]

ASF GitHub Bot logged work on TS-4998:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 21:44
Start Date: 24/Oct/16 21:44
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/964/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31017)
Time Spent: 1h 10m  (was: 1h)

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[GitHub] trafficserver issue #1135: TS-4998: Move plugins into a common non-recursive...

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/964/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4998?focusedWorklogId=31016=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31016
 ]

ASF GitHub Bot logged work on TS-4998:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 21:40
Start Date: 24/Oct/16 21:40
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1072/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31016)
Time Spent: 1h  (was: 50m)

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[GitHub] trafficserver issue #1135: TS-4998: Move plugins into a common non-recursive...

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1072/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=31015=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31015
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 21:30
Start Date: 24/Oct/16 21:30
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on the issue:

https://github.com/apache/trafficserver/pull/1133
  
Randall and I ran into another issue with this patch, so doing some more 
debugging :-/.


Issue Time Tracking
---

Worklog Id: (was: 31015)
Time Spent: 1h 20m  (was: 1h 10m)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[GitHub] trafficserver issue #1133: TS-4993: Disables escaping and quotes inside rege...

2016-10-24 Thread zwoop
Github user zwoop commented on the issue:

https://github.com/apache/trafficserver/pull/1133
  
Randall and I ran into another issue with this patch, so doing some more 
debugging :-/.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4998?focusedWorklogId=31013=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31013
 ]

ASF GitHub Bot logged work on TS-4998:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 21:26
Start Date: 24/Oct/16 21:26
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1071/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31013)
Time Spent: 40m  (was: 0.5h)

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[jira] [Work logged] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4998?focusedWorklogId=31014=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31014
 ]

ASF GitHub Bot logged work on TS-4998:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 21:26
Start Date: 24/Oct/16 21:26
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/963/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31014)
Time Spent: 50m  (was: 40m)

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[GitHub] trafficserver issue #1135: TS-4998: Move plugins into a common non-recursive...

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/963/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1135: TS-4998: Move plugins into a common non-recursive...

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1071/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1135: TS-4998: Move plugins into a common non-recursive...

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/962/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4998?focusedWorklogId=31001=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31001
 ]

ASF GitHub Bot logged work on TS-4998:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 21:06
Start Date: 24/Oct/16 21:06
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
Linux build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/962/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31001)
Time Spent: 0.5h  (was: 20m)

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[jira] [Work logged] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4998?focusedWorklogId=31000=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31000
 ]

ASF GitHub Bot logged work on TS-4998:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 21:02
Start Date: 24/Oct/16 21:02
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
FreeBSD build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1070/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31000)
Time Spent: 20m  (was: 10m)

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[GitHub] trafficserver issue #1135: TS-4998: Move plugins into a common non-recursive...

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1135
  
FreeBSD build *failed*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1070/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4998?focusedWorklogId=30999=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30999
 ]

ASF GitHub Bot logged work on TS-4998:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 20:53
Start Date: 24/Oct/16 20:53
Worklog Time Spent: 10m 
  Work Description: GitHub user jpeach opened a pull request:

https://github.com/apache/trafficserver/pull/1135

TS-4998: Move plugins into a common non-recursive build.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jpeach/trafficserver build/plugins

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/1135.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1135






Issue Time Tracking
---

Worklog Id: (was: 30999)
Time Spent: 10m
Remaining Estimate: 0h

> Build plugins non-recursively.
> --
>
> Key: TS-4998
> URL: https://issues.apache.org/jira/browse/TS-4998
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Build, Plugins
>Reporter: James Peach
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Build the top-level plugins non-recursively to remove build configuration 
> duplication and increase parallelism.



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


[GitHub] trafficserver pull request #1135: TS-4998: Move plugins into a common non-re...

2016-10-24 Thread jpeach
GitHub user jpeach opened a pull request:

https://github.com/apache/trafficserver/pull/1135

TS-4998: Move plugins into a common non-recursive build.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jpeach/trafficserver build/plugins

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/1135.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1135






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (TS-4998) Build plugins non-recursively.

2016-10-24 Thread James Peach (JIRA)
James Peach created TS-4998:
---

 Summary: Build plugins non-recursively.
 Key: TS-4998
 URL: https://issues.apache.org/jira/browse/TS-4998
 Project: Traffic Server
  Issue Type: Bug
  Components: Build, Plugins
Reporter: James Peach


Build the top-level plugins non-recursively to remove build configuration 
duplication and increase parallelism.



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


[jira] [Work logged] (TS-4990) Add support for new apis in ts_lua

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4990?focusedWorklogId=30998=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30998
 ]

ASF GitHub Bot logged work on TS-4990:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 20:20
Start Date: 24/Oct/16 20:20
Worklog Time Spent: 10m 
  Work Description: Github user shukitchan commented on the issue:

https://github.com/apache/trafficserver/pull/1127
  
@jpeach pls take a look if you get a chance. thanks.


Issue Time Tracking
---

Worklog Id: (was: 30998)
Time Spent: 40m  (was: 0.5h)

> Add support for new apis in ts_lua
> --
>
> Key: TS-4990
> URL: https://issues.apache.org/jira/browse/TS-4990
> Project: Traffic Server
>  Issue Type: Improvement
>  Components: Lua, Plugins
>Reporter: Kit Chan
>Assignee: Kit Chan
> Fix For: 7.1.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Want to add support for the following apis in ts_lua plugin
> TSHttpTxnParentProxyGet
> TSHttpTxnParentProxySet
> TSHttpTxnClientProtocolStackGet
> TSHttpTxnServerPush
> TSHttpTxnIsWebsocket
> TSHttpTxnPluginTagGet
> TSHttpTxnServerAddrSet



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


[GitHub] trafficserver issue #1127: [TS-4990] support new apis in ts_lua

2016-10-24 Thread shukitchan
Github user shukitchan commented on the issue:

https://github.com/apache/trafficserver/pull/1127
  
@jpeach pls take a look if you get a chance. thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1133: TS-4993: Disables escaping and quotes insi...

2016-10-24 Thread zwoop
Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84770706
  
--- Diff: plugins/header_rewrite/parser.cc ---
@@ -133,14 +152,15 @@ Parser::preprocess(std::vector tokens)
   std::string s = tokens[0].substr(2, tokens[0].size() - 3);
 
   _op = s;
-  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) { // cond + (=/) + argument
+  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) {
+// cond + [=<>] + argument
 _arg = tokens[1] + tokens[2];
   } else if (tokens.size() > 1) {
+// This is for the regular expression, which for some reason has 
its own handling?? ToDo: Why ?
--- End diff --

The comment? It's what it says, that case is for the regular expression 
case, I kinda wish we had treated / as the other operators (=, < and >), but we 
do not. And I don't think this is the time to change that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30994=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30994
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 20:01
Start Date: 24/Oct/16 20:01
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84729282
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
 }
 
-extern "C" void
-TSDebug(const char *tag, const char *fmt, ...)
-{
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stdout, "TSDebug: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
-}
-
-#define CHECK_EQ(x, y)   \
-  do {   \
-if ((x) != (y)) {\
-  fprintf(stderr, "CHECK FAILED\n"); \
-  return 1;  \
-}\
-  } while (false);
-
 class ParserTest : public Parser
 {
 public:
-  ParserTest(std::string line) : Parser(line) {}
+  ParserTest(std::string line) : Parser(line), res(true) { std::cout << 
"Starting parser test: " << line << std::endl; }
   std::vector
   getTokens()
   {
 return _tokens;
   }
+
+  template 
+  void
+  do_parser_check(T x, U y, int line = 0)
+  {
+if (x != y) {
+  std::cerr << "CHECK FAILED on line " << line << ": " << x << " != " 
<< y << std::endl;
+  res = false;
+}
+  }
+
+  bool res;
--- End diff --

That's the check :). This is what DO_CHECK() used to do as a macro, but I 
turned it into a templetized function so that DO_CHECK can produce output about 
the check for the various types of input parameters.


Issue Time Tracking
---

Worklog Id: (was: 30994)
Time Spent: 1h 10m  (was: 1h)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[GitHub] trafficserver pull request #1133: TS-4993: Disables escaping and quotes insi...

2016-10-24 Thread zwoop
Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84729282
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
 }
 
-extern "C" void
-TSDebug(const char *tag, const char *fmt, ...)
-{
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stdout, "TSDebug: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
-}
-
-#define CHECK_EQ(x, y)   \
-  do {   \
-if ((x) != (y)) {\
-  fprintf(stderr, "CHECK FAILED\n"); \
-  return 1;  \
-}\
-  } while (false);
-
 class ParserTest : public Parser
 {
 public:
-  ParserTest(std::string line) : Parser(line) {}
+  ParserTest(std::string line) : Parser(line), res(true) { std::cout << 
"Starting parser test: " << line << std::endl; }
   std::vector
   getTokens()
   {
 return _tokens;
   }
+
+  template 
+  void
+  do_parser_check(T x, U y, int line = 0)
+  {
+if (x != y) {
+  std::cerr << "CHECK FAILED on line " << line << ": " << x << " != " 
<< y << std::endl;
+  res = false;
+}
+  }
+
+  bool res;
--- End diff --

That's the check :). This is what DO_CHECK() used to do as a macro, but I 
turned it into a templetized function so that DO_CHECK can produce output about 
the check for the various types of input parameters.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1133: TS-4993: Disables escaping and quotes insi...

2016-10-24 Thread zwoop
Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84723539
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
--- End diff --

So, the issue was that there are two test cases that are intended to fail. 
When running this from command line (to verify / analyze tests), it would 
therefore always produce two errors on the output. I found this confusing as 
hell, thinking that the parser was actually failing (which it was not). So, I 
removed this, so it produces no output, and instead the test now properly 
detect the errors, and produce more useful information when they do fail 
unexpectedly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30996=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30996
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 20:01
Start Date: 24/Oct/16 20:01
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84770706
  
--- Diff: plugins/header_rewrite/parser.cc ---
@@ -133,14 +152,15 @@ Parser::preprocess(std::vector tokens)
   std::string s = tokens[0].substr(2, tokens[0].size() - 3);
 
   _op = s;
-  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) { // cond + (=/) + argument
+  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) {
+// cond + [=<>] + argument
 _arg = tokens[1] + tokens[2];
   } else if (tokens.size() > 1) {
+// This is for the regular expression, which for some reason has 
its own handling?? ToDo: Why ?
--- End diff --

The comment? It's what it says, that case is for the regular expression 
case, I kinda wish we had treated / as the other operators (=, < and >), but we 
do not. And I don't think this is the time to change that.


Issue Time Tracking
---

Worklog Id: (was: 30996)
Time Spent: 1h 10m  (was: 1h)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[GitHub] trafficserver pull request #1133: TS-4993: Disables escaping and quotes insi...

2016-10-24 Thread zwoop
Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84770538
  
--- Diff: plugins/header_rewrite/parser.cc ---
@@ -133,14 +152,15 @@ Parser::preprocess(std::vector tokens)
   std::string s = tokens[0].substr(2, tokens[0].size() - 3);
 
   _op = s;
-  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) { // cond + (=/) + argument
+  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) {
+// cond + [=<>] + argument
--- End diff --

Remove what?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1133: TS-4993: Disables escaping and quotes insi...

2016-10-24 Thread zwoop
Github user zwoop commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84770458
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
 }
 
-extern "C" void
-TSDebug(const char *tag, const char *fmt, ...)
-{
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stdout, "TSDebug: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
-}
-
-#define CHECK_EQ(x, y)   \
-  do {   \
-if ((x) != (y)) {\
-  fprintf(stderr, "CHECK FAILED\n"); \
-  return 1;  \
-}\
-  } while (false);
-
 class ParserTest : public Parser
 {
 public:
-  ParserTest(std::string line) : Parser(line) {}
+  ParserTest(std::string line) : Parser(line), res(true) { std::cout << 
"Starting parser test: " << line << std::endl; }
   std::vector
   getTokens()
   {
 return _tokens;
   }
+
+  template 
+  void
+  do_parser_check(T x, U y, int line = 0)
+  {
+if (x != y) {
+  std::cerr << "CHECK FAILED on line " << line << ": " << x << " != " 
<< y << std::endl;
+  res = false;
+}
+  }
+
+  bool res;
 };
 
+#define CHECK_EQ(x, y) \
+  do { \
+p.do_parser_check((x), (y), __LINE__); \
+  } while (false);
+
+#define END_TEST(s) \
+  do {  \
+if (!p.res) {   \
+  ++errors; \
+}   \
+  } while (false);
+
 int
 test_parsing()
 {
+  int errors = 0;
+
   {
 ParserTest p("cond  %{READ_REQUEST_HDR_HOOK}");
-CHECK_EQ(p.getTokens().size(), 2);
+
+CHECK_EQ(p.getTokens().size(), 2U);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{READ_REQUEST_HDR_HOOK}");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:Host}=a");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{CLIENT-HEADER:Host}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "a");
+
+END_TEST();
   }
 
   {
 ParserTest p(" # COMMENT!");
-CHECK_EQ(p.getTokens().size(), 0);
+
+CHECK_EQ(p.getTokens().size(), 0UL);
 CHECK_EQ(p.empty(), true);
+
+END_TEST();
   }
 
   {
 ParserTest p("# COMMENT");
-CHECK_EQ(p.getTokens().size(), 0);
+
+CHECK_EQ(p.getTokens().size(), 0UL);
 CHECK_EQ(p.empty(), true);
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{Client-HEADER:Foo} =b");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{Client-HEADER:Foo}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "b");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{Client-HEADER:Blah}   =x");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{Client-HEADER:Blah}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "x");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:non_existent_header} =  \"shouldnt_ 
  exist_anyway\"  [AND]");
-CHECK_EQ(p.getTokens().size(), 5);
+
+CHECK_EQ(p.getTokens().size(), 5UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{CLIENT-HEADER:non_existent_header}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "shouldnt_   exist_anyway");
 CHECK_EQ(p.getTokens()[4], "[AND]");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:non_existent_header} =  \"shouldnt_ 
  =_anyway\"  [AND]");
-CHECK_EQ(p.getTokens().size(), 5);
  

[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30995=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30995
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 20:01
Start Date: 24/Oct/16 20:01
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84723539
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
--- End diff --

So, the issue was that there are two test cases that are intended to fail. 
When running this from command line (to verify / analyze tests), it would 
therefore always produce two errors on the output. I found this confusing as 
hell, thinking that the parser was actually failing (which it was not). So, I 
removed this, so it produces no output, and instead the test now properly 
detect the errors, and produce more useful information when they do fail 
unexpectedly.


Issue Time Tracking
---

Worklog Id: (was: 30995)
Time Spent: 1h 10m  (was: 1h)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30997=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30997
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 20:01
Start Date: 24/Oct/16 20:01
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84770458
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
 }
 
-extern "C" void
-TSDebug(const char *tag, const char *fmt, ...)
-{
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stdout, "TSDebug: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
-}
-
-#define CHECK_EQ(x, y)   \
-  do {   \
-if ((x) != (y)) {\
-  fprintf(stderr, "CHECK FAILED\n"); \
-  return 1;  \
-}\
-  } while (false);
-
 class ParserTest : public Parser
 {
 public:
-  ParserTest(std::string line) : Parser(line) {}
+  ParserTest(std::string line) : Parser(line), res(true) { std::cout << 
"Starting parser test: " << line << std::endl; }
   std::vector
   getTokens()
   {
 return _tokens;
   }
+
+  template 
+  void
+  do_parser_check(T x, U y, int line = 0)
+  {
+if (x != y) {
+  std::cerr << "CHECK FAILED on line " << line << ": " << x << " != " 
<< y << std::endl;
+  res = false;
+}
+  }
+
+  bool res;
 };
 
+#define CHECK_EQ(x, y) \
+  do { \
+p.do_parser_check((x), (y), __LINE__); \
+  } while (false);
+
+#define END_TEST(s) \
+  do {  \
+if (!p.res) {   \
+  ++errors; \
+}   \
+  } while (false);
+
 int
 test_parsing()
 {
+  int errors = 0;
+
   {
 ParserTest p("cond  %{READ_REQUEST_HDR_HOOK}");
-CHECK_EQ(p.getTokens().size(), 2);
+
+CHECK_EQ(p.getTokens().size(), 2U);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{READ_REQUEST_HDR_HOOK}");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:Host}=a");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{CLIENT-HEADER:Host}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "a");
+
+END_TEST();
   }
 
   {
 ParserTest p(" # COMMENT!");
-CHECK_EQ(p.getTokens().size(), 0);
+
+CHECK_EQ(p.getTokens().size(), 0UL);
 CHECK_EQ(p.empty(), true);
+
+END_TEST();
   }
 
   {
 ParserTest p("# COMMENT");
-CHECK_EQ(p.getTokens().size(), 0);
+
+CHECK_EQ(p.getTokens().size(), 0UL);
 CHECK_EQ(p.empty(), true);
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{Client-HEADER:Foo} =b");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{Client-HEADER:Foo}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "b");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{Client-HEADER:Blah}   =x");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{Client-HEADER:Blah}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "x");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:non_existent_header} =  \"shouldnt_ 
  exist_anyway\"  [AND]");
-CHECK_EQ(p.getTokens().size(), 5);
+
+CHECK_EQ(p.getTokens().size(), 5UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 

[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30993=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30993
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 20:01
Start Date: 24/Oct/16 20:01
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84770538
  
--- Diff: plugins/header_rewrite/parser.cc ---
@@ -133,14 +152,15 @@ Parser::preprocess(std::vector tokens)
   std::string s = tokens[0].substr(2, tokens[0].size() - 3);
 
   _op = s;
-  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) { // cond + (=/) + argument
+  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) {
+// cond + [=<>] + argument
--- End diff --

Remove what?


Issue Time Tracking
---

Worklog Id: (was: 30993)
Time Spent: 1h 10m  (was: 1h)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[jira] [Work logged] (TS-4997) Move C++ API to plugins.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4997?focusedWorklogId=30989=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30989
 ]

ASF GitHub Bot logged work on TS-4997:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:49
Start Date: 24/Oct/16 16:49
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/961/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 30989)
Time Spent: 1h 20m  (was: 1h 10m)

> Move C++ API to plugins.
> 
>
> Key: TS-4997
> URL: https://issues.apache.org/jira/browse/TS-4997
> Project: Traffic Server
>  Issue Type: Task
>  Components: CPP API
>Reporter: James Peach
>Assignee: James Peach
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Move the C++ API to the {{plugins}} directory. Although the C++ API is a 
> dependency of some plugins, it is itself a consumer of the TS plugin API, so 
> the best place from a build ordering POV is {{plugins}}.



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


[GitHub] trafficserver issue #1134: TS-4997: Move C++ API to plugins.

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/961/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4997) Move C++ API to plugins.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4997?focusedWorklogId=30988=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30988
 ]

ASF GitHub Bot logged work on TS-4997:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:45
Start Date: 24/Oct/16 16:45
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1069/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 30988)
Time Spent: 1h 10m  (was: 1h)

> Move C++ API to plugins.
> 
>
> Key: TS-4997
> URL: https://issues.apache.org/jira/browse/TS-4997
> Project: Traffic Server
>  Issue Type: Task
>  Components: CPP API
>Reporter: James Peach
>Assignee: James Peach
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Move the C++ API to the {{plugins}} directory. Although the C++ API is a 
> dependency of some plugins, it is itself a consumer of the TS plugin API, so 
> the best place from a build ordering POV is {{plugins}}.



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


[GitHub] trafficserver issue #1134: TS-4997: Move C++ API to plugins.

2016-10-24 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1069/ for details.
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30987=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30987
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:36
Start Date: 24/Oct/16 16:36
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/1133
  
@zwoop This would have been better if it was split into multiple commits to 
separate the test changes from the actual bug fixes. 


Issue Time Tracking
---

Worklog Id: (was: 30987)
Time Spent: 1h  (was: 50m)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[GitHub] trafficserver issue #1133: TS-4993: Disables escaping and quotes inside rege...

2016-10-24 Thread jpeach
Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/1133
  
@zwoop This would have been better if it was split into multiple commits to 
separate the test changes from the actual bug fixes. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1128: Doc: tweaks and cleanup

2016-10-24 Thread jsime
Github user jsime commented on the issue:

https://github.com/apache/trafficserver/pull/1128
  
Sorry it took a couple days to review, but everything non-enum related 
looks good. Thanks for all the cleanup, @SolidWallOfCode!

The lack of proper enum support in the C sphinx domain is bothersome. I'd 
be inclined to either abuse the C++ domain's enum support even for C code, or 
take the longer view of trying to port (or encourage someone to port) the 
enumerator from the C++ domain to the C domain in Sphinx. The latter would 
involve us bumping Sphinx versions, but at least it would feel less wrong than 
using the wrong Sphinx domain for parts of the TS C API docs.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30985=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30985
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:27
Start Date: 24/Oct/16 16:27
Worklog Time Spent: 10m 
  Work Description: Github user bryancall commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84726802
  
--- Diff: plugins/header_rewrite/parser.cc ---
@@ -133,14 +152,15 @@ Parser::preprocess(std::vector tokens)
   std::string s = tokens[0].substr(2, tokens[0].size() - 3);
 
   _op = s;
-  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) { // cond + (=/) + argument
+  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) {
+// cond + [=<>] + argument
--- End diff --

Remove this?


Issue Time Tracking
---

Worklog Id: (was: 30985)
Time Spent: 50m  (was: 40m)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[GitHub] trafficserver pull request #1133: TS-4993: Disables escaping and quotes insi...

2016-10-24 Thread bryancall
Github user bryancall commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84726802
  
--- Diff: plugins/header_rewrite/parser.cc ---
@@ -133,14 +152,15 @@ Parser::preprocess(std::vector tokens)
   std::string s = tokens[0].substr(2, tokens[0].size() - 3);
 
   _op = s;
-  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) { // cond + (=/) + argument
+  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) {
+// cond + [=<>] + argument
--- End diff --

Remove this?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1133: TS-4993: Disables escaping and quotes insi...

2016-10-24 Thread bryancall
Github user bryancall commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84724447
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
 }
 
-extern "C" void
-TSDebug(const char *tag, const char *fmt, ...)
-{
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stdout, "TSDebug: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
-}
-
-#define CHECK_EQ(x, y)   \
-  do {   \
-if ((x) != (y)) {\
-  fprintf(stderr, "CHECK FAILED\n"); \
-  return 1;  \
-}\
-  } while (false);
-
 class ParserTest : public Parser
 {
 public:
-  ParserTest(std::string line) : Parser(line) {}
+  ParserTest(std::string line) : Parser(line), res(true) { std::cout << 
"Starting parser test: " << line << std::endl; }
   std::vector
   getTokens()
   {
 return _tokens;
   }
+
+  template 
+  void
+  do_parser_check(T x, U y, int line = 0)
+  {
+if (x != y) {
+  std::cerr << "CHECK FAILED on line " << line << ": " << x << " != " 
<< y << std::endl;
+  res = false;
+}
+  }
+
+  bool res;
 };
 
+#define CHECK_EQ(x, y) \
+  do { \
+p.do_parser_check((x), (y), __LINE__); \
+  } while (false);
+
+#define END_TEST(s) \
+  do {  \
+if (!p.res) {   \
+  ++errors; \
+}   \
+  } while (false);
+
 int
 test_parsing()
 {
+  int errors = 0;
+
   {
 ParserTest p("cond  %{READ_REQUEST_HDR_HOOK}");
-CHECK_EQ(p.getTokens().size(), 2);
+
+CHECK_EQ(p.getTokens().size(), 2U);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{READ_REQUEST_HDR_HOOK}");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:Host}=a");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{CLIENT-HEADER:Host}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "a");
+
+END_TEST();
   }
 
   {
 ParserTest p(" # COMMENT!");
-CHECK_EQ(p.getTokens().size(), 0);
+
+CHECK_EQ(p.getTokens().size(), 0UL);
 CHECK_EQ(p.empty(), true);
+
+END_TEST();
   }
 
   {
 ParserTest p("# COMMENT");
-CHECK_EQ(p.getTokens().size(), 0);
+
+CHECK_EQ(p.getTokens().size(), 0UL);
 CHECK_EQ(p.empty(), true);
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{Client-HEADER:Foo} =b");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{Client-HEADER:Foo}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "b");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{Client-HEADER:Blah}   =x");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{Client-HEADER:Blah}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "x");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:non_existent_header} =  \"shouldnt_ 
  exist_anyway\"  [AND]");
-CHECK_EQ(p.getTokens().size(), 5);
+
+CHECK_EQ(p.getTokens().size(), 5UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{CLIENT-HEADER:non_existent_header}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "shouldnt_   exist_anyway");
 CHECK_EQ(p.getTokens()[4], "[AND]");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:non_existent_header} =  \"shouldnt_ 
  =_anyway\"  [AND]");
-CHECK_EQ(p.getTokens().size(), 

[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30983=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30983
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:27
Start Date: 24/Oct/16 16:27
Worklog Time Spent: 10m 
  Work Description: Github user bryancall commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84724447
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
 }
 
-extern "C" void
-TSDebug(const char *tag, const char *fmt, ...)
-{
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stdout, "TSDebug: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
-}
-
-#define CHECK_EQ(x, y)   \
-  do {   \
-if ((x) != (y)) {\
-  fprintf(stderr, "CHECK FAILED\n"); \
-  return 1;  \
-}\
-  } while (false);
-
 class ParserTest : public Parser
 {
 public:
-  ParserTest(std::string line) : Parser(line) {}
+  ParserTest(std::string line) : Parser(line), res(true) { std::cout << 
"Starting parser test: " << line << std::endl; }
   std::vector
   getTokens()
   {
 return _tokens;
   }
+
+  template 
+  void
+  do_parser_check(T x, U y, int line = 0)
+  {
+if (x != y) {
+  std::cerr << "CHECK FAILED on line " << line << ": " << x << " != " 
<< y << std::endl;
+  res = false;
+}
+  }
+
+  bool res;
 };
 
+#define CHECK_EQ(x, y) \
+  do { \
+p.do_parser_check((x), (y), __LINE__); \
+  } while (false);
+
+#define END_TEST(s) \
+  do {  \
+if (!p.res) {   \
+  ++errors; \
+}   \
+  } while (false);
+
 int
 test_parsing()
 {
+  int errors = 0;
+
   {
 ParserTest p("cond  %{READ_REQUEST_HDR_HOOK}");
-CHECK_EQ(p.getTokens().size(), 2);
+
+CHECK_EQ(p.getTokens().size(), 2U);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{READ_REQUEST_HDR_HOOK}");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:Host}=a");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{CLIENT-HEADER:Host}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "a");
+
+END_TEST();
   }
 
   {
 ParserTest p(" # COMMENT!");
-CHECK_EQ(p.getTokens().size(), 0);
+
+CHECK_EQ(p.getTokens().size(), 0UL);
 CHECK_EQ(p.empty(), true);
+
+END_TEST();
   }
 
   {
 ParserTest p("# COMMENT");
-CHECK_EQ(p.getTokens().size(), 0);
+
+CHECK_EQ(p.getTokens().size(), 0UL);
 CHECK_EQ(p.empty(), true);
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{Client-HEADER:Foo} =b");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{Client-HEADER:Foo}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "b");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{Client-HEADER:Blah}   =x");
-CHECK_EQ(p.getTokens().size(), 4);
+
+CHECK_EQ(p.getTokens().size(), 4UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 CHECK_EQ(p.getTokens()[1], "%{Client-HEADER:Blah}");
 CHECK_EQ(p.getTokens()[2], "=");
 CHECK_EQ(p.getTokens()[3], "x");
+
+END_TEST();
   }
 
   {
 ParserTest p("cond %{CLIENT-HEADER:non_existent_header} =  \"shouldnt_ 
  exist_anyway\"  [AND]");
-CHECK_EQ(p.getTokens().size(), 5);
+
+CHECK_EQ(p.getTokens().size(), 5UL);
 CHECK_EQ(p.getTokens()[0], "cond");
 

[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30986=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30986
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:27
Start Date: 24/Oct/16 16:27
Worklog Time Spent: 10m 
  Work Description: Github user bryancall commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84722717
  
--- Diff: plugins/header_rewrite/header_rewrite_test.cc ---
@@ -31,274 +33,395 @@ const char PLUGIN_NAME_DBG[] = 
"TEST_dbg_header_rewrite";
 extern "C" void
 TSError(const char *fmt, ...)
 {
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stderr, "TSError: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
 }
 
-extern "C" void
-TSDebug(const char *tag, const char *fmt, ...)
-{
-  char buf[2048];
-  int bytes = 0;
-  va_list args;
-  va_start(args, fmt);
-  if ((bytes = vsnprintf(buf, sizeof(buf), fmt, args)) > 0) {
-fprintf(stdout, "TSDebug: %s: %.*s\n", PLUGIN_NAME, bytes, buf);
-  }
-  va_end(args);
-}
-
-#define CHECK_EQ(x, y)   \
-  do {   \
-if ((x) != (y)) {\
-  fprintf(stderr, "CHECK FAILED\n"); \
-  return 1;  \
-}\
-  } while (false);
-
 class ParserTest : public Parser
 {
 public:
-  ParserTest(std::string line) : Parser(line) {}
+  ParserTest(std::string line) : Parser(line), res(true) { std::cout << 
"Starting parser test: " << line << std::endl; }
   std::vector
   getTokens()
   {
 return _tokens;
   }
+
+  template 
+  void
+  do_parser_check(T x, U y, int line = 0)
+  {
+if (x != y) {
+  std::cerr << "CHECK FAILED on line " << line << ": " << x << " != " 
<< y << std::endl;
+  res = false;
+}
+  }
+
+  bool res;
--- End diff --

What is this for?


Issue Time Tracking
---

Worklog Id: (was: 30986)
Time Spent: 50m  (was: 40m)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[jira] [Work logged] (TS-4993) backslash/escape removed from header_rewrite rule when unquoted

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4993?focusedWorklogId=30984=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30984
 ]

ASF GitHub Bot logged work on TS-4993:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:27
Start Date: 24/Oct/16 16:27
Worklog Time Spent: 10m 
  Work Description: Github user bryancall commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84726964
  
--- Diff: plugins/header_rewrite/parser.cc ---
@@ -133,14 +152,15 @@ Parser::preprocess(std::vector tokens)
   std::string s = tokens[0].substr(2, tokens[0].size() - 3);
 
   _op = s;
-  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) { // cond + (=/) + argument
+  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) {
+// cond + [=<>] + argument
 _arg = tokens[1] + tokens[2];
   } else if (tokens.size() > 1) {
+// This is for the regular expression, which for some reason has 
its own handling?? ToDo: Why ?
--- End diff --

Don't understand and have to catch a flight.


Issue Time Tracking
---

Worklog Id: (was: 30984)
Time Spent: 50m  (was: 40m)

> backslash/escape removed from header_rewrite rule when unquoted
> ---
>
> Key: TS-4993
> URL: https://issues.apache.org/jira/browse/TS-4993
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Plugins
>Affects Versions: 7.0.0
>Reporter: Randall Meyer
>Assignee: Leif Hedstrom
> Fix For: 7.1.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Loading up a configuration with a header_rewrite rule of:
> {noformat}
> cond %{READ_RESPONSE_HDR_HOOK} [AND]
> cond %{PATH} /(\.html|\.js|\.png)(?:\?(.*))*$/ [AND]
> cond %{STATUS} >199 [AND]
> cond %{STATUS} <300
>   set-header Cache-Control "max-age=31536000, public
> {noformat}
> results in an call to abort() in matcher.h under ATS 7.0.0. This worked fine 
> under ATS 6.x (and probably 5.3.x)
> {noformat}
> (gdb) where
> #0  0x74f64625 in *__GI_raise (sig=) at 
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x74f65e05 in *__GI_abort () at abort.c:92
> #2  0x7fffe71dd3ff in Matchers::setRegex 
> (this=this@entry=0x7fffe5ac0f80) at matcher.h:98
> #3  0x7fffe71d7baa in Matchers::set (d=..., 
> this=0x7fffe5ac0f80) at matcher.h:119
> #4  ConditionPath::initialize (this=0x7fffe59a6d00, p=...) at 
> conditions.cc:260
> {noformat}
> The string comes to matcher with the escapes removed:
> {noformat}
> Adding condition: %{PATH} with arg: /(.html|.js|.png)(?:?(.*))*$/
> {noformat}
> If I add quotes around the regex, this regex is passed through correctly 
> escaped.
> Not sure if this is expected behavior or not. 
> This also seems related to TS-4797 and TS-4940. 



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


[GitHub] trafficserver pull request #1133: TS-4993: Disables escaping and quotes insi...

2016-10-24 Thread bryancall
Github user bryancall commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1133#discussion_r84726964
  
--- Diff: plugins/header_rewrite/parser.cc ---
@@ -133,14 +152,15 @@ Parser::preprocess(std::vector tokens)
   std::string s = tokens[0].substr(2, tokens[0].size() - 3);
 
   _op = s;
-  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) { // cond + (=/) + argument
+  if (tokens.size() > 2 && (tokens[1][0] == '=' || tokens[1][0] == '>' 
|| tokens[1][0] == '<')) {
+// cond + [=<>] + argument
 _arg = tokens[1] + tokens[2];
   } else if (tokens.size() > 1) {
+// This is for the regular expression, which for some reason has 
its own handling?? ToDo: Why ?
--- End diff --

Don't understand and have to catch a flight.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4997) Move C++ API to plugins.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4997?focusedWorklogId=30982=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30982
 ]

ASF GitHub Bot logged work on TS-4997:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:20
Start Date: 24/Oct/16 16:20
Worklog Time Spent: 10m 
  Work Description: Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
As I mentioned, from a build and dependencies point of view, ``cppapi`` is 
a plugin. It depends on the TS API layer and is constrained (currently) from 
using any internal APIs. So the build is basically the same as a plugin.

It certainly does not belong in `lib` because it is not an internal library 
and is a consumer of the low layers. ``plugins`` is not the ideal home, but it 
seems like the best option for now.


Issue Time Tracking
---

Worklog Id: (was: 30982)
Time Spent: 1h  (was: 50m)

> Move C++ API to plugins.
> 
>
> Key: TS-4997
> URL: https://issues.apache.org/jira/browse/TS-4997
> Project: Traffic Server
>  Issue Type: Task
>  Components: CPP API
>Reporter: James Peach
>Assignee: James Peach
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Move the C++ API to the {{plugins}} directory. Although the C++ API is a 
> dependency of some plugins, it is itself a consumer of the TS plugin API, so 
> the best place from a build ordering POV is {{plugins}}.



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


[GitHub] trafficserver issue #1134: TS-4997: Move C++ API to plugins.

2016-10-24 Thread jpeach
Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
As I mentioned, from a build and dependencies point of view, ``cppapi`` is 
a plugin. It depends on the TS API layer and is constrained (currently) from 
using any internal APIs. So the build is basically the same as a plugin.

It certainly does not belong in `lib` because it is not an internal library 
and is a consumer of the low layers. ``plugins`` is not the ideal home, but it 
seems like the best option for now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (TS-4995) Consolidate C++ API example plugins.

2016-10-24 Thread James Peach (JIRA)

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

James Peach resolved TS-4995.
-
   Resolution: Fixed
 Assignee: James Peach  (was: Brian Geffon)
Fix Version/s: 7.1.0

> Consolidate C++ API example plugins.
> 
>
> Key: TS-4995
> URL: https://issues.apache.org/jira/browse/TS-4995
> Project: Traffic Server
>  Issue Type: Bug
>  Components: CPP API, Plugins
>Reporter: James Peach
>Assignee: James Peach
> Fix For: 7.1.0
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Move the C++ API examples to colocate them with the rest of the examples.



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


[jira] [Work logged] (TS-4995) Consolidate C++ API example plugins.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4995?focusedWorklogId=30981=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30981
 ]

ASF GitHub Bot logged work on TS-4995:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 16:17
Start Date: 24/Oct/16 16:17
Worklog Time Spent: 10m 
  Work Description: Github user jpeach closed the pull request at:

https://github.com/apache/trafficserver/pull/1132


Issue Time Tracking
---

Worklog Id: (was: 30981)
Time Spent: 1h  (was: 50m)

> Consolidate C++ API example plugins.
> 
>
> Key: TS-4995
> URL: https://issues.apache.org/jira/browse/TS-4995
> Project: Traffic Server
>  Issue Type: Bug
>  Components: CPP API, Plugins
>Reporter: James Peach
>Assignee: Brian Geffon
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Move the C++ API examples to colocate them with the rest of the examples.



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


[GitHub] trafficserver pull request #1132: TS-4995: Consolidate C++ API example plugi...

2016-10-24 Thread jpeach
Github user jpeach closed the pull request at:

https://github.com/apache/trafficserver/pull/1132


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver issue #1134: TS-4997: Move C++ API to plugins.

2016-10-24 Thread bryancall
Github user bryancall commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
I agree with Leif.  Looking at the patch again I think it is good to move 
the plugins to example/, but not all cppapi under plugins/.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Work logged] (TS-4997) Move C++ API to plugins.

2016-10-24 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-4997?focusedWorklogId=30979=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30979
 ]

ASF GitHub Bot logged work on TS-4997:
--

Author: ASF GitHub Bot
Created on: 24/Oct/16 15:16
Start Date: 24/Oct/16 15:16
Worklog Time Spent: 10m 
  Work Description: Github user bryancall commented on the issue:

https://github.com/apache/trafficserver/pull/1134
  
I agree with Leif.  Looking at the patch again I think it is good to move 
the plugins to example/, but not all cppapi under plugins/.



Issue Time Tracking
---

Worklog Id: (was: 30979)
Time Spent: 50m  (was: 40m)

> Move C++ API to plugins.
> 
>
> Key: TS-4997
> URL: https://issues.apache.org/jira/browse/TS-4997
> Project: Traffic Server
>  Issue Type: Task
>  Components: CPP API
>Reporter: James Peach
>Assignee: James Peach
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Move the C++ API to the {{plugins}} directory. Although the C++ API is a 
> dependency of some plugins, it is itself a consumer of the TS plugin API, so 
> the best place from a build ordering POV is {{plugins}}.



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


[jira] [Commented] (TS-4994) PANIC: unprotected error in call to Lua API (not enough memory)

2016-10-24 Thread Kit Chan (JIRA)

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

Kit Chan commented on TS-4994:
--

I think it should not have any side effect. I can ship a patch to make this 
configurable once you confirm that it works.

> PANIC: unprotected error in call to Lua API (not enough memory)
> ---
>
> Key: TS-4994
> URL: https://issues.apache.org/jira/browse/TS-4994
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Lua
>Affects Versions: 6.2.0
>Reporter: Felicity Tarnell
>Assignee: Kit Chan
> Fix For: 7.1.0
>
>
> We have a working installation of TS 6.1; when upgrading to 6.2, it 
> repeatedly crashes almost immediately after startup with:
> {noformat}
> PANIC: unprotected error in call to Lua API (not enough memory)
> pure virtual method called
> terminate called without an active exception
> traffic_server: using root directory '/opt/tbx'
> traffic_server: Aborted (Signal sent by tkill() 11964 33)
> traffic_server - STACK TRACE: 
> /opt/tbx/bin/traffic_server(_Z19crash_logger_invokeiP9siginfo_tPv+0x8e)[0x4ac16e]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0)[0x2b2c43b828d0]
> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x2b2c44b52067]
> /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x2b2c44b53448]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x15d)[0x2b2c4435bb3d]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5ebb6)[0x2b2c44359bb6]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5ec01)[0x2b2c44359c01]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5f6cf)[0x2b2c4435a6cf]
> /opt/tbx/bin/traffic_server(_ZN9NetAccept18do_blocking_acceptEP7EThread+0x99)[0x74dd69]
> /opt/tbx/bin/traffic_server(_ZN9NetAccept15acceptLoopEventEiP5Event+0x2b)[0x74e62b]
> /opt/tbx/bin/traffic_server(_ZN7EThread7executeEv+0x7f)[0x77ce1f]
> /opt/tbx/bin/traffic_server[0x77c315]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x80a4)[0x2b2c43b7b0a4]
> /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x2b2c44c0587d]
> {noformat}
> We have about 5000 lines of Lua, and one C module (lualdap), but nothing that 
> should be approaching Lua's memory limit; it's mostly just access checks that 
> don't allocate any memory at all.



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


[jira] [Commented] (TS-4994) PANIC: unprotected error in call to Lua API (not enough memory)

2016-10-24 Thread Felicity Tarnell (JIRA)

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

Felicity Tarnell commented on TS-4994:
--

Lowering to 64 seems to have fixed it - at least it's not crashing immediately 
anymore.  Are there any side-effects of changing the value?

> PANIC: unprotected error in call to Lua API (not enough memory)
> ---
>
> Key: TS-4994
> URL: https://issues.apache.org/jira/browse/TS-4994
> Project: Traffic Server
>  Issue Type: Bug
>  Components: Lua
>Affects Versions: 6.2.0
>Reporter: Felicity Tarnell
>Assignee: Kit Chan
> Fix For: 7.1.0
>
>
> We have a working installation of TS 6.1; when upgrading to 6.2, it 
> repeatedly crashes almost immediately after startup with:
> {noformat}
> PANIC: unprotected error in call to Lua API (not enough memory)
> pure virtual method called
> terminate called without an active exception
> traffic_server: using root directory '/opt/tbx'
> traffic_server: Aborted (Signal sent by tkill() 11964 33)
> traffic_server - STACK TRACE: 
> /opt/tbx/bin/traffic_server(_Z19crash_logger_invokeiP9siginfo_tPv+0x8e)[0x4ac16e]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0)[0x2b2c43b828d0]
> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x2b2c44b52067]
> /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x2b2c44b53448]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x15d)[0x2b2c4435bb3d]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5ebb6)[0x2b2c44359bb6]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5ec01)[0x2b2c44359c01]
> /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x5f6cf)[0x2b2c4435a6cf]
> /opt/tbx/bin/traffic_server(_ZN9NetAccept18do_blocking_acceptEP7EThread+0x99)[0x74dd69]
> /opt/tbx/bin/traffic_server(_ZN9NetAccept15acceptLoopEventEiP5Event+0x2b)[0x74e62b]
> /opt/tbx/bin/traffic_server(_ZN7EThread7executeEv+0x7f)[0x77ce1f]
> /opt/tbx/bin/traffic_server[0x77c315]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x80a4)[0x2b2c43b7b0a4]
> /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x2b2c44c0587d]
> {noformat}
> We have about 5000 lines of Lua, and one C module (lualdap), but nothing that 
> should be approaching Lua's memory limit; it's mostly just access checks that 
> don't allocate any memory at all.



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