trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susan Hinrichs <>
Subject Re: TS-4703 && PR-829
Date Fri, 29 Jul 2016 12:42:41 GMT

On 7/28/2016 7:28 PM, James Peach wrote:
>> On Jul 29, 2016, at 12:29 AM, Susan Hinrichs <>
>> On 7/28/2016 5:05 AM, James Peach wrote:
>>>> On Jul 28, 2016, at 7:33 PM, James Peach <> wrote:
>>>>> On Jul 28, 2016, at 5:50 AM, Petar Bozhidarov Penkov <>
>>>>> Hello,
>>>>> I am writing in accordance with the referenced Pull Request and JIRA
>>>>> I am proposing a GET-er method for Transactions's underlying protocol.
>>>>> relates to TS-2987 and is effectively one of the proposed solutions,
>>>>> wrapper around ProxyClientTransaction::get_protocol_string() . The proposed
>>>>> API is as follows:
>>>>> *tsapi const char *TSHttpTxnClientProtocolGet(TSHttpTxn txnp);*
>>>>> **name credit goes to Susan Hinrichs and Alan Carroll*
>>>> Hi Petar,
>>>> I’m not sure that this is the right approach. get_protocol_string() simply
distinguishes HTTP/2 sessions, so it it not something that I think is ready to become API.
Since we already have an abstraction for HTTP versions (see TSHttpHdrVersionGet), maybe a
better approach is to expose a convenience API that returns the transaction HTTP version as
a TS_HTTP_VERSION() constant.
>>> We also have a pending review for TSHttpTxnIsWebsocket(), which seems to overlap
with this proposal.
>> Yes, we would like to know whether the transaction is part of a Http/1.x session
or a Http/2 session (or whatever else comes up in the future.
> Do you have a concrete use case for knowing this?
> J
Yes, Petar encountered a need for this while writing one of his 
functional testing plugins.  He added a "dump" feature which reports the 
number of active sessions and the type of session.  This information can 
be useful in debugging "stuck" sessions.  Or sessions behaving badly.

View raw message