On Wed, 11 Dec 2013 10:27:33 -0600 Alan M. Carroll <a...@network-geographics.com> wrote: > Subject: Re: Range transform problems > > Tuesday, December 10, 2013, 10:29:36 PM, you wrote: > >> On Dec 9, 2013, at 2:53 PM, Alan M. Carroll <a...@network-geographics.com> >> wrote: > >>> I've been failing at solving the range transform issue for quite a while. I >>> think now we need to do something a little bit bigger to make it work >>> correctly and I have outlined that as an API proposal in the wiki. > >>> https://cwiki.apache.org/confluence/display/TS/Transform+Plugin+Content+Length+Control > >> A few questions: >> - what happens if the TS_HTTP_TRANSFORM_CONTENT_LENGTH_HOOK hook is not >> registered? > > As noted, this is treated as if the plugin returned INDETERMINATE, which is > what the current code is structured to presume in all cases. > >> - where does the original Content-Length header come from? > > The cached response header.
Or the upstream response - right? Will the first plugin transform receive the original CL + the 'range transformed' CL? >> - what happens if everyone just returns INDETERMINATE all the time? > > The same thing that happens now. That's the goal. > >> - if it is ok to always return INDETERMINATE, then why would you return >> anything else? > > Two reasons: > > 1) You don't want to force ATS to use connection closing or chunked encoding > to signal end of stream, and you can compute the content length. A buffering transform (that can't calculate the final length before seeing the payload) shouldn't force us to switch to connection: close / chunked if it buffers the full payload before starting to flush out the modified version.... > 2) You are a range transform. Cheers, Uri