Github user jpeach commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/1007#discussion_r78410540
--- Diff: proxy/InkAPI.cc ---
@@ -9193,3 +9193,71 @@ TSHttpTxnIdGet(TSHttpTxn txnp)
return (uint64_t)sm->sm_id;
}
+
+// Return information about the protocols used by the client
+TSReturnCode
+TSHttpTxnClientProtocolStackGet(TSHttpTxn txnp, int n, char const
**result, int *actual)
+{
+ sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
+ sdk_assert(result != NULL);
+ HttpSM *sm = (HttpSM *)txnp;
+ int count = 0;
+ if (sm) {
+ count = sm->populate_client_protocol(result, n);
+ }
+ if (actual) {
+ *actual = count;
--- End diff --
Is ``result`` allowed to be ``NULL``? We should ``sdk_assert`` that
``result`` and ``actual`` are both either present or absent together.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---