[GitHub] trafficserver pull request #1594: Early intervention APIs

2017-03-20 Thread SolidWallOfCode
Github user SolidWallOfCode commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1594#discussion_r107026702
  
--- Diff: proxy/InkAPI.cc ---
@@ -9112,6 +9113,65 @@ TSSslContextDestroy(TSSslContext ctx)
   SSLReleaseContext(reinterpret_cast(ctx));
 }
 
+void
+TSRegisterProtocolSet(TSVConn sslp, TSNextProtocolSet ps)
+{
+  NetVConnection *vc= reinterpret_cast(sslp);
+  SSLNetVConnection *ssl_vc = dynamic_cast(vc);
+  if (ssl_vc) {
+ssl_vc->registerNextProtocolSet(reinterpret_cast(ps));
+  }
+}
+
+TSNextProtocolSet
+TSUnregisterProtocol(TSNextProtocolSet protoset, const char *protocol)
+{
+  SSLNextProtocolSet *snps = reinterpret_cast(protoset);
+  if (snps) {
+snps->unregisterEndpoint(protocol, nullptr);
+return reinterpret_cast(snps);
+  }
+  return nullptr;
+}
+
+TSAcceptor
+TSAcceptorGet(TSVConn sslp)
+{
+  NetVConnection *vc= reinterpret_cast(sslp);
+  SSLNetVConnection *ssl_vc = dynamic_cast(vc);
+  return ssl_vc ? reinterpret_cast(ssl_vc->accept_object) : 
nullptr;
+}
+
+extern std::vector naVec;
+TSAcceptor
+TSAcceptorGetbyID(int ID)
+{
+  Debug("ssl", "getNetAccept in INK API.cc %p", naVec.at(ID));
+  return reinterpret_cast(naVec.at(ID));
+}
+
+int
+TSAcceptorIDGet(TSAcceptor acceptor)
+{
+  NetAccept *na = reinterpret_cast(acceptor);
+  return na ? na->id : -1;
+}
+
+int
+TSAcceptorCount()
+{
+  return naVec.size();
+}
+
+// clones the protoset associated with netAccept
+TSNextProtocolSet
+TSGetcloneProtoSet(TSAcceptor tna)
+{
+  NetAccept *na = reinterpret_cast(tna);
+  // clone protoset
+  return (na && na->snpa) ? 
reinterpret_cast(na->snpa->cloneProtoSet()) : nullptr;
--- End diff --

Style: maybe
```
return reinterpret_cast(na && na->snpa ? 
na->snpa->cloneProtoSet() : nullptr);
```
The key point being the type of the ternary operator is not mixed and 
exposed to the `return` statement. Not sure that's worth it but sometimes it 
can be a compilation issue.


---
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 #1594: Early intervention APIs

2017-03-20 Thread SolidWallOfCode
Github user SolidWallOfCode commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1594#discussion_r107020509
  
--- Diff: iocore/net/SSLNetVConnection.cc ---
@@ -1338,9 +1338,8 @@ SSLNetVConnection::sslClientHandShakeEvent(int )
 }
 
 void
-SSLNetVConnection::registerNextProtocolSet(const SSLNextProtocolSet *s)
+SSLNetVConnection::registerNextProtocolSet(SSLNextProtocolSet *s)
--- End diff --

Let's change this to `assignNextProtocolSet`


---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
clang-analyzer build *successful*! 
https://ci.trafficserver.apache.org/job/clang-analyzer-github/345/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
Intel CC build *successful*! 
https://ci.trafficserver.apache.org/job/icc-github/213/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
Linux build *successful*! 
https://ci.trafficserver.apache.org/job/linux-github/1675/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
FreeBSD11 build *successful*! 
https://ci.trafficserver.apache.org/job/freebsd-github/1782/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
AU check *successful*! 
https://ci.trafficserver.apache.org/job/autest-github/84/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
clang-analyzer build *successful*! 
https://ci.trafficserver.apache.org/job/clang-analyzer-github/344/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
RAT check *successful*! 
https://ci.trafficserver.apache.org/job/RAT-github/100/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
clang format *successful*! 
https://ci.trafficserver.apache.org/job/clang-format-github/87/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
Intel CC build *failed*! 
https://ci.trafficserver.apache.org/job/icc-github/212/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
Linux build *failed*! 
https://ci.trafficserver.apache.org/job/linux-github/1674/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
FreeBSD11 build *failed*! 
https://ci.trafficserver.apache.org/job/freebsd-github/1781/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
AU check *successful*! 
https://ci.trafficserver.apache.org/job/autest-github/83/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
clang format *failed*! 
https://ci.trafficserver.apache.org/job/clang-format-github/86/
 



---
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 #1594: Early intervention APIs

2017-03-20 Thread atsci
Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1594
  
RAT check *successful*! 
https://ci.trafficserver.apache.org/job/RAT-github/99/
 



---
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 #1599: Remove combohandler feature gate for 8.0 release

2017-03-20 Thread danobi
GitHub user danobi opened an issue:

https://github.com/apache/trafficserver/issues/1599

Remove combohandler feature gate for 8.0 release

I recently noticed `combohandler` was marking all of its generated 
documents as `Cache-Control: Public` regardless of what the requested documents 
contained in `Cache-Control`. That's a bug. I've feature-gated the fix using a 
`#define FEAT_GATE_8_0` in commit 9d33ca20. It should be undef'd for 8.0 since 
it's a breaking change.






---
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 #1598: Assertion failing when calling TSHttpTxnReenable ...

2017-03-20 Thread clearswift
Github user clearswift commented on the issue:

https://github.com/apache/trafficserver/issues/1598
  
I've tried that (and quite a few different things) and had the same result. 
The example was intended to be as minimal as possible.

There is an example plugin (examples/thread-1) that does the same thing as 
my example except that it uses a request related hook (OS_DNS). It doesn't use 
TSContSchedule to re-enable the transaction, but just does it in the thread 
function.



---
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 #1594: Early intervention APIs

2017-03-20 Thread persiaAziz
Github user persiaAziz commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1594#discussion_r106951005
  
--- Diff: proxy/InkAPI.cc ---
@@ -9112,6 +9113,66 @@ TSSslContextDestroy(TSSslContext ctx)
   SSLReleaseContext(reinterpret_cast(ctx));
 }
 
+void
+TSRegisterProtocolSet(TSVConn sslp, TSNextProtocolSet ps)
+{
+  NetVConnection *vc= reinterpret_cast(sslp);
+  SSLNetVConnection *ssl_vc = dynamic_cast(vc);
+  if (ssl_vc) {
+ssl_vc->clearnpnSet();
--- End diff --

I think just getting rid of clearnpnset should suffice, since we are 
removing the assert. No need for unification


---
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 #1594: Early intervention APIs

2017-03-20 Thread SolidWallOfCode
Github user SolidWallOfCode commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1594#discussion_r106937502
  
--- Diff: proxy/InkAPI.cc ---
@@ -9112,6 +9113,66 @@ TSSslContextDestroy(TSSslContext ctx)
   SSLReleaseContext(reinterpret_cast(ctx));
 }
 
+void
+TSRegisterProtocolSet(TSVConn sslp, TSNextProtocolSet ps)
+{
+  NetVConnection *vc= reinterpret_cast(sslp);
+  SSLNetVConnection *ssl_vc = dynamic_cast(vc);
+  if (ssl_vc) {
+ssl_vc->clearnpnSet();
--- End diff --

I discussed this with @persiaAziz and we concluded the `assert` is no 
longer useful given that the purpose of this API is to change the value even if 
it's already set. Therefore these two methods should be unified and the 
`assert` removed.


---
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 #1598: Assertion failing when calling TSHttpTxnReenable ...

2017-03-20 Thread jpeach
Github user jpeach commented on the issue:

https://github.com/apache/trafficserver/issues/1598
  
You have to call `TSHttpTxnReenable` from an event thread. The typical 
pattern is to use `TSContSchedule` to bounce the call back over to the event 
thread pool once you are done.


---
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 #1598: Assertion failing when calling TSHttpTxnReenable ...

2017-03-20 Thread clearswift
GitHub user clearswift opened an issue:

https://github.com/apache/trafficserver/issues/1598

Assertion failing when calling TSHttpTxnReenable from another thread.

See the attached example plugin. This hooks onto the 
`TS_HTTP_READ_RESPONSE_HDR_HOOK` hook and, on that event, launches a thread 
that re-enables the transaction. This fails the assertion 
`ink_release_assert(!server_vc || !client_vc || server_vc->thread == 
client_vc->thread);` on line 5933 in HttpSM.cc when making multiple connections.

A simple test of this is to browse any reasonably substantial web page (I 
used bbc.co.uk) through the proxy with this plugin enabled. Removing the 
assertion allows the page to load successfully.

So why is the assertion there? What's the issue with the client and server 
threads being different? As I said, removing the assertion makes things work 
but is there some corner case where this matters?

Alternatively, is the plugin wrong? Is it allowed to call TSHttpTxnReenable 
from a different thread? Is there a better way to do this?


[ThreadTestPlugin.zip](https://github.com/apache/trafficserver/files/855468/ThreadTestPlugin.zip)







---
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 #1548: Insure that parent health stats are update...

2017-03-20 Thread jrushford
Github user jrushford closed the pull request at:

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


---
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 #1548: Insure that parent health stats are updated prope...

2017-03-20 Thread jrushford
Github user jrushford commented on the issue:

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

Should backport it to 7.1.0.  Submitted an issue to refactor the duplicated 
code into a base class and will merge this pr.

Thanks
--
John J. Rushford
IPCDN Engineering
1400 Wewatta Street, Denver Colorado 80202
john_rushf...@cable.comcast.com











From: Leif Hedstrom 
Reply-To: apache/trafficserver 
Date: Thursday, March 16, 2017 at 1:24 PM
To: apache/trafficserver 
Cc: John Rushford , Mention 

Subject: Re: [apache/trafficserver] Insure that parent health stats are 
updated properly on a markdown (#1548)


@jrushford I assume we don't want this for 
7.1.0 ?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on 
GitHub,
 or mute the 
thread.



---
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 #1594: Early intervention APIs

2017-03-20 Thread persiaAziz
Github user persiaAziz commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1594#discussion_r106927789
  
--- Diff: iocore/net/P_SSLNetVConnection.h ---
@@ -295,7 +302,7 @@ class SSLNetVConnection : public UnixNetVConnection
 HANDSHAKE_HOOKS_DONE
   } sslHandshakeHookState;
 
-  const SSLNextProtocolSet *npnSet;
+  mutable SSLNextProtocolSet *npnSet;
--- End diff --

It does not. My initial implementation required this, then I forgot to 
change this back


---
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 #1597: Refactor ParentRoundRobin and ParentConsistentHas...

2017-03-20 Thread jrushford
GitHub user jrushford opened an issue:

https://github.com/apache/trafficserver/issues/1597

Refactor ParentRoundRobin and ParentConsistentHash policy's

The ParentRoundRobin and ParentConsistentHash selection policies have 
functions that should be refactored into a base class as these functions are 
duplicates of one anther.  Specifically markParentDown(), markParentUp() and 
numParents().






---
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 #1516: Implement Cache-Control: immutable handlin...

2017-03-20 Thread shukitchan
Github user shukitchan closed the pull request at:

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


---
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.
---