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

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

                Author: ASF GitHub Bot
            Created on: 12/Sep/16 19:10
            Start Date: 12/Sep/16 19:10
    Worklog Time Spent: 10m 
      Work Description: Github user shinrich commented on a diff in the pull 
request:

    https://github.com/apache/trafficserver/pull/1007#discussion_r78435282
  
    --- 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;
    +  }
    +  return TS_SUCCESS;
    +}
    +
    +TSReturnCode
    +TSHttpSsnClientProtocolStackGet(TSHttpSsn ssnp, int n, char const 
**result, int *actual)
    +{
    +  sdk_assert(sdk_sanity_check_http_ssn(ssnp) == TS_SUCCESS);
    +  ProxyClientSession *cs = reinterpret_cast<ProxyClientSession *>(ssnp);
    +  int count              = 0;
    +  if (cs) {
    +    count = cs->populate_protocol(result, n);
    +  }
    +  if (actual) {
    +    *actual = count;
    +  }
    +  return TS_SUCCESS;
    +}
    +
    +char const *
    +TSNormalizedProtocolTag(char const *tag)
    +{
    +  return ts_normalize_proto_tag(tag);
    +}
    +
    +int
    +TSHttpTxnClientProtocolStackContains(TSHttpTxn txnp, char const *tag, char 
const **ret_tag)
    --- End diff --
    
    Agreed.  Making the change.


Issue Time Tracking
-------------------

    Worklog Id:     (was: 28860)
    Time Spent: 8h 20m  (was: 8h 10m)

> Adds an API call to retrieve transaction protocol
> -------------------------------------------------
>
>                 Key: TS-4703
>                 URL: https://issues.apache.org/jira/browse/TS-4703
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: TS API
>            Reporter: Petar Penkov
>            Assignee: Susan Hinrichs
>             Fix For: 7.0.0
>
>          Time Spent: 8h 20m
>  Remaining Estimate: 0h
>
> It would be useful if there was a way to retrieve the underlying protocol for 
> a given transaction through the tsapi at the very least for plugin logging 
> purposes. This can be achieved with a very simple method since this 
> information is already available internally. 



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

Reply via email to