Suppose you begin to write data to the TSVConn which is got from continuation's handler with TS_EVENT_NET_ACCEPT event, you can insert the 'Transfer-Encoding: chunked' in the response header, and then when you got a data segment from other place, just wrap it in chunked format.
On Thu, Feb 12, 2015 at 6:49 AM, Sandeep Davu <sandeep.d...@gmail.com> wrote: > Thanks, > > I was a little confused about this part. I was looking for helper function > which can do it for me. I see that ChunkHandler has access to chunk and > dechunk, but is not exposed. Should this be exposed for making the plugin > experience easier? > > Sandeep. > > On Wed, Feb 11, 2015 at 2:38 PM, Brian Geffon <briangef...@gmail.com> > wrote: > > > You'll have to handle chunking yourself; it should be relatively simple > to > > do. > > > > On Wed, Feb 11, 2015 at 2:22 PM, Sandeep Davu <sandeep.d...@gmail.com> > > wrote: > > > > > Who will be responsible for chunking? Plugin has access to response and > > not > > > chunked data. If Intercept writes a raw byte stream, how does the data > > get > > > chunked? > > > > > > > > > Sandeep. > > > > > > On Wed, Feb 11, 2015 at 1:51 PM, James Peach <jpe...@apache.org> > wrote: > > > > > > > > > > > > On Feb 11, 2015, at 11:35 AM, Sandeep Davu <sandeep.d...@gmail.com > > > > > > wrote: > > > > > > > > > > How to send chunked data on Server Intercept Plugin? The content > > length > > > > is > > > > > not known before hand. Idea is to stream data as it becomes > > > available. I > > > > > am assuming the intercept send data needs to know that the data is > > > > chunked. > > > > > > > > The server intercept writes a raw byte stream, so you can do whatever > > you > > > > want. If you want to write a chinked response, just write it as if > your > > > > plugin was a real HTTP server (which, effectively, it is). Take a > look > > at > > > > example/intercept/intercept.cc. > > > > > > > > J > > > > > > > > > > > > > >