Accurately tracking data transferred via a plugin?

2012-08-16 Thread Adam Phelps
I'm working on a plugin, one of the functions of which is to accurate track how much data is being sent to a given client, both for totals and a per-UserAgent count. This seems to mostly work, but I'm seeing some major discrepancies between what the plugin is reporting and what is actually bei

Re: Accurately tracking data transferred via a plugin?

2012-08-16 Thread Phil Sorber
Does your plugin handle chunked encoding? On Thu, Aug 16, 2012 at 8:14 PM, Adam Phelps wrote: > I'm working on a plugin, one of the functions of which is to accurate track > how much data is being sent to a given client, both for totals and a > per-UserAgent count. > > This seems to mostly work,

Re: Accurately tracking data transferred via a plugin?

2012-08-16 Thread Conan
There are two API: TSHttpTxnClientRespBodyBytesGet and TSHttpTxnClientRespHdrBytesGet (can be invoked in TS_HTTP_TXN_CLOSE_HOOK in my test). I think their returned value are % and %. Content-Length is larger than transfered length, because user-agent can easily abort request. On Fri, Aug 17, 201