Github user masaori335 commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/829#discussion_r72548973
  
    --- Diff: proxy/InkAPI.cc ---
    @@ -4655,6 +4655,15 @@ TSHttpTxnClientReqGet(TSHttpTxn txnp, TSMBuffer 
*bufp, TSMLoc *obj)
       return TS_ERROR;
     }
     
    +const char *
    +TSHttpTxnClientProtocolGet(TSHttpTxn txnp)
    +{
    +  sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
    +
    +  HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
    +  return sm->ua_session->get_protocol_string();
    --- End diff --
    
    It is better to check `sm->ua_session` is not NULL, before call 
`get_protocol_string()`.


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

Reply via email to