Thanks Nick, that was very helpful!  I found the relevant example in the
ironbee source on github.  The trick is to iterate through all blocks in
the TSIOBuffer and memcpy into a buffer.

For anyone that's interested:
https://github.com/ironbee/ironbee/blob/97b453afd9c3dc70342c6183a875bde22c9c4a76/servers/trafficserver/ts_headers.c#L300

Obviously, the TSIOBufferReaderRead() function in 7.1 would make this a lot
shorter to write.

On Thu, Nov 3, 2016 at 3:38 AM, Nick Kew <n...@apache.org> wrote:

> On Wed, 2016-11-02 at 22:44 -0700, Daniel Chang wrote:
> > Hi dev,
> >
> > First email to this mailing list, excited to be here!  I'm new to ATS
> > development so please bear with me.
> >
> > Briefly, I want to inspect the content data of HTTP responses for all of
> my
> > Transactions and store them on disk / in memory.  From a few hours of
> > reading, I've decided that creating a Transform plugin and reading from
> > VIOs is the correct way to do this, please correct me if I'm wrong.
>
> Yes, that's the right basic approach.
>
> It's a while since I've worked on it, but the Ironbee plugin
> inspects response (and request) data, and has used basically
> the same APIs with every TS version since 2.x.  A look at that
> might be a good startingpoint.  Check the Ironbee site for
> the latest, as live development moved away from github.
>
> Or you might be able to use Ironbee for your purposes without
> any new plugin.
>
> --
> Nick Kew
>
>

Reply via email to