You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Alan M. Carroll" <am...@network-geographics.com> on 2013/12/09 23:53:31 UTC
Range transform problems
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
Re: Range transform problems
Posted by "Alan M. Carroll" <am...@network-geographics.com>.
Wednesday, December 18, 2013, 4:51:31 PM, you wrote:
>>> - 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?
Well, the range transform is just another transform (that's the origin of this problem). Either it's first, in which case there is no 'range transformed' CL to give it, or it's not first, in which case the *next* transform gets the original and modified CL. Whether it's modified because of a range transform specifically or not is what I want to avoid making an issue.
RE: Range transform problems
Posted by Uri Shachar <us...@hotmail.com>.
On Wed, 11 Dec 2013 10:27:33 -0600 Alan M. Carroll <am...@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 <am...@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
Re: Range transform problems
Posted by "Alan M. Carroll" <am...@network-geographics.com>.
Tuesday, December 10, 2013, 10:29:36 PM, you wrote:
> On Dec 9, 2013, at 2:53 PM, Alan M. Carroll <am...@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.
> - 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.
2) You are a range transform.
Re: Range transform problems
Posted by James Peach <jp...@apache.org>.
On Dec 9, 2013, at 2:53 PM, Alan M. Carroll <am...@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?
- where does the original Content-Length header come from?
- what happens if everyone just returns INDETERMINATE all the time?
- if it is ok to always return INDETERMINATE, then why would you return anything else?
J
Re: Range transform problems
Posted by "Alan M. Carroll" <am...@network-geographics.com>.
>> https://cwiki.apache.org/confluence/display/TS/Transform+Plugin+Content+Length+Control
> I read the proposal and found it very reasonable. Better yet, it
> sounds like it could be possible to make this API/ABI compatible.
I think 4.2.X seems reasonable, although I will try for 4.1.X.
Re: Range transform problems
Posted by Igor Galić <i....@brainsware.org>.
----- Original Message -----
> 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
>
>
I read the proposal and found it very reasonable. Better yet, it
sounds like it could be possible to make this API/ABI compatible.
What's the ETA here? 4.1.x? 4.2.x?
++ i
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 8716 7A9F 989B ABD5 100F 4008 F266 55D6 2998 1641