Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 531DD200CC8 for ; Fri, 14 Jul 2017 17:57:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4FF0616DA1E; Fri, 14 Jul 2017 15:57:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 962EF16DA10 for ; Fri, 14 Jul 2017 17:57:39 +0200 (CEST) Received: (qmail 60123 invoked by uid 500); 14 Jul 2017 15:57:38 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 60114 invoked by uid 99); 14 Jul 2017 15:57:38 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jul 2017 15:57:38 +0000 Received: from [192.168.201.21] (c-73-181-14-238.hsd1.co.comcast.net [73.181.14.238]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D83BA1A0029 for ; Fri, 14 Jul 2017 15:57:37 +0000 (UTC) From: Leif Hedstrom Content-Type: multipart/alternative; boundary="Apple-Mail=_3CFABC9E-CE51-4F85-B39C-942CF182C0B0" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: issue in getting http response size Date: Fri, 14 Jul 2017 09:57:35 -0600 References: To: users@trafficserver.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3273) archived-at: Fri, 14 Jul 2017 15:57:40 -0000 --Apple-Mail=_3CFABC9E-CE51-4F85-B39C-942CF182C0B0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 14, 2017, at 1:37 AM, Gaurav Bansal wrote: >=20 > hi all, > I want to get the total http response size (i.e. size of headers + = body). For this i tried using below two api's : > TSHttpTxnServerRespBodyBytesGet(txnp) //always returns 0 > TSHttpTxnServerRespHdrBytesGet(txnp) //seems to work fine Hmmm, sounds broken / bad. First I thought it might be cache hit / miss = related, but then reading your email again, it seems the header bytes is = always right, so that can=E2=80=99t be it=E2=80=A6 Do you have a = reproducible test case? A small plugin that you can maybe attach to a = Github Issue? That much said, maybe you could try these instead? TSHttpTxnClientRespHdrBytesGet() TSHttpTxnClientRespBodyBytesGet() Cheers, =E2=80=94 leif --Apple-Mail=_3CFABC9E-CE51-4F85-B39C-942CF182C0B0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On Jul 14, 2017, at 1:37 AM, Gaurav Bansal <zeebee48@gmail.com> = wrote:

hi all,
I want to get the total = http response size (i.e. size of headers + body). For this i tried using = below two api's :
TSHttpTxnServerRespBodyBytesGet(txnp)     = //always returns 0
TSHttpTxnServerRespHdrBytesGet(txnp)    &nb= sp;  //seems to work fine



Hmmm, sounds broken / bad. First I thought it might be cache = hit / miss related, but then reading your email again, it seems the = header bytes is always right, so that can=E2=80=99t be it=E2=80=A6 =  Do you have a reproducible test case? A small plugin that you can = maybe attach to a Github Issue?

That much said, maybe you could try = these instead?

= TSHttpTxnClientRespHdrBytesGet()
= TSHttpTxnClientRespBodyBytesGet()


Cheers,

=E2=80=94 leif

= --Apple-Mail=_3CFABC9E-CE51-4F85-B39C-942CF182C0B0--