Return-Path: X-Original-To: apmail-trafficserver-dev-archive@www.apache.org Delivered-To: apmail-trafficserver-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A2C51895C for ; Wed, 27 Jan 2016 23:20:34 +0000 (UTC) Received: (qmail 24933 invoked by uid 500); 27 Jan 2016 23:20:24 -0000 Delivered-To: apmail-trafficserver-dev-archive@trafficserver.apache.org Received: (qmail 24868 invoked by uid 500); 27 Jan 2016 23:20:24 -0000 Mailing-List: contact dev-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list dev@trafficserver.apache.org Delivered-To: moderator for dev@trafficserver.apache.org Received: (qmail 90863 invoked by uid 99); 27 Jan 2016 20:55:11 -0000 X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.898 X-Spam-Level: ** X-Spam-Status: No, score=2.898 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=uuFlFILfsLU5BO0fdE0MWxY1E1T9iS18jHTiKpMny3A=; b=B5wFzln849Ncc7KV3onHC3abU4fr2wEQfohVfCMBH3CP/ReoxUp0Knd9tGs9Jimxd/ CtkM97IH6gSp7ffKcvtyAtADcfDnFvuD2X5dR8SoNqQGQZajE+rvAipjAVj5zO+mH7CE xR8vjUKZgd/3cnbu7UOdiwCrIkThx6NMZwcpYiqTouWsyM1+1hRD7BTsnLnoy+MRGatJ D18Cj1nD95dMjUBqP5Jxa1GE1hAb+1FExOlt83hNYYr32dFTHF0sAH4h/DkoIdn+9lTO +JiRJyu3B20izLSwzxbpOCzh4mOBd8M1Y6X8JDY4mlQ7bGtZnnH8V8cB4AC6Tw7n9m35 gIkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=uuFlFILfsLU5BO0fdE0MWxY1E1T9iS18jHTiKpMny3A=; b=amwYZwSxSogMvnOwzNENYINT/UNI+FT2olULvdEikAFa0gkTQA9pv7xWLMuDCayqJ4 c7AlB4Wluq9FfstN+oqwXv2nyC5IKk0r7tMN85ANoz/bUEgJQM5zxA2y4tlYVi05Nd96 sFxIpWwLy8qQcfXxAlJKqVO4V02pEtSdjl2sdhFAE/sGEqjPHxlIHHrCWjM3P07K7o99 8jY3UeAxgrdkbVX9UyKuL9fGxRt5TLEotsNqIacbcYVnJ6YR2E8O+gyEBmS8xKRgh5F5 iY9JbA/JRJWHvvU0GVwW+5tjQQSLiQNFoRNLLJxEQfe4TYI7K6Ixggf3BiUwhV496F2u hPcQ== X-Gm-Message-State: AG10YOR1Y1s8Z7mNEkYkHu37WZTz1dQNxFtIWT5nE/AmO+aHTyALnUkToaoNWSBTc4UBFgZWI7puv8VKMERlFA== X-Received: by 10.129.34.133 with SMTP id i127mr17090004ywi.153.1453928102655; Wed, 27 Jan 2016 12:55:02 -0800 (PST) MIME-Version: 1.0 From: Yitzchak Weiser Date: Wed, 27 Jan 2016 15:54:43 -0500 Message-ID: Subject: ATSCPPAPI To: dev@trafficserver.apache.org Content-Type: multipart/alternative; boundary=001a114091bc167cb4052a57045a --001a114091bc167cb4052a57045a Content-Type: text/plain; charset=UTF-8 Hi, Im a bit new to TS and TS plugin development, so I started writing one using the ATSCPPAPI I am trying to get the total Req/Resp Hdr/Bdy bite sizes using the transaction.getClientResponseHeaderSize() and getClientResponseBodySize respectively. I placed it in the latest CPP transaction hook, the HOOK_SEND_RESPONSE_HEADERS and the values are 0. This makes sense, as the Response Headers/Body were not sent to the client yet. However, I cannot find a later hook, it seems like the CPP api wraps calls to TSHttpTxnClientRespHdrBytesGet and that must be done TransactionClose hook (TS_EVENT_HTTP_TXN_CLOSE) however, the CPP API does not expose a hook for the transaction close, rather expects you to place all clean up code in the destructor, which gets called during TS_EVENT_HTTP_TXN_CLOSE. This doesnt work for the getClientResponseHeaderSize as I need a reference to the transaction? Did I miss something here? Any reason why the CPP API cannot directly expose a hook for Plugin::HOOK_TXN_CLOSE? How else can I get the values of the client response hdrs/body bytes? Thanks --001a114091bc167cb4052a57045a--