You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Eli Marmor <ma...@netmask.it> on 2001/11/30 05:01:00 UTC

CL for Proxy Requests

Content-Length is not passed through proxy requests, when Apache 2.0 is
used as the proxy.

Is it a bug?
Feature?
Limitation?

Or is it just me?  My configuration?

Many clients depend on this data, for example audio/video players, so
it is quite bad to lack CL.

Is there any way to tell the API that the filters don't change the
response size so the original CL can be used?

-- 
Eli Marmor
marmor@netmask.it
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.:   +972-9-766-1020          8 Yad-Harutzim St.
Fax.:   +972-9-766-1314          P.O.B. 7004
Mobile: +972-50-23-7338          Kfar-Saba 44641, Israel

Re: CL for Proxy Requests

Posted by Graham Leggett <mi...@sharp.fm>.
Ryan Bloom wrote:

> Our proxy doesn't use filters.  It tries to create fake requests, but it is a hack.
> It writes directly to the socket occasionally, and even when it doesn't, it is too
> hard to follow what is actually happening in the proxy.

As I understand it we do use filters (but my understanding is probably
wrong) - specifically in the http and ftp proxies (notably not the
connect proxy, but then by definition a connect proxy is a passthrough
entity thus filters would be redundant anyway).

The proxy code initiates a socket connection, then it creates a simple
filter stack containing a few basic filters, like (up till recently)
DECHUNK, HTTP_IN and CORE (if memory serves). The stack is then called,
and content arrives. This content is then passed to the normal output
filter stack.

The main missing piece of this is that I understand is that it is
currently not possible for a user via ProxyAdd[Input|Output]Filter to
add a filter to this backside filter stack. The fix would thus be to add
a set of Proxy... options, and a set of hooks allowing independant
modules (eg mod_headers, whatever) to add filters to the backside filter
stack.

My understanding of the bucket code is also incomplete - I understand
there are a number of types of buckets, representing data in various
ways, from the logical sequence-of-bytes type bucket to buckets that
represent pipes, etc - am I right in thinking there is suck a bucket
that represents a socket connection, and that we should be using such a
bucket to kick off the backside filter stack, and not use a manual
socket connection as is done now? (Am I talking rubbish?)

If this is so - how do we open a connection to one of many sockets, in
such a way that if the first attempt to connect fails, the second is
attempted (etc)...?

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

Re: CL for Proxy Requests

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 30 November 2001 01:19 pm, Graham Leggett wrote:
> Ryan Bloom wrote:
> > Yeah, but that is one of the problems with the proxy right now.  It
> > doesn't use the correct mechanisms for creating theham backend request. 
> > If you remember, Danny Lopez asked for this ability a while ago, and we
> > didn't implement it. In fact, I modified the proxy to use a hook for
> > creating the request, which allows modules to insert their filters.  This
> > would have allowed a module to hook the create_poxy_request, and add
> > their own filters, but the proxy doesn't use the filters correctly.
>
> I don't understand enough about the "correct" way of using the filters
> to see what is being done wrong - can you explain how it should be done?
> When I have some time soon (when current project is off plate) I'll have
> time to look at this.

Our proxy doesn't use filters.  It tries to create fake requests, but it is a hack.
It writes directly to the socket occasionally, and even when it doesn't, it is too
hard to follow what is actually happening in the proxy.

The proxy needs to be abstracted a lot more than it is, and it needs to take
advantage of filters.

Ryan
______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: CL for Proxy Requests

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 30 November 2001 01:17 pm, Graham Leggett wrote:
> Ian Holsman wrote:
> > Yes.. I was on vaction at the time
> > we also use the same feature danny asked for (a hook pre-proxy request)
> > We're there any objections to adding the hook?
>
> If what can be done with a hook can be done with a filter instead, we
> should rather add the add-a-filter to the backend capability.
>
> A lot of work has gone into removing proxy-specific features in favour
> of generic features that can be used to solve the same problems that the
> proxy-specific features solved.
>
> What would be useful though is a hook in the proxy that mirrors the
> fixup phase, but for the backend connection. This can be used to change
> request headers (this was discussed before).

The point is to remove more proxy specific stuff.  You can't add a filter to the
back-end connection right now.  That is a big bug.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: CL for Proxy Requests

Posted by Graham Leggett <mi...@sharp.fm>.
Ian Holsman wrote:

> Yes.. I was on vaction at the time
> we also use the same feature danny asked for (a hook pre-proxy request)
> We're there any objections to adding the hook?

If what can be done with a hook can be done with a filter instead, we
should rather add the add-a-filter to the backend capability.

A lot of work has gone into removing proxy-specific features in favour
of generic features that can be used to solve the same problems that the
proxy-specific features solved.

What would be useful though is a hook in the proxy that mirrors the
fixup phase, but for the backend connection. This can be used to change
request headers (this was discussed before).

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

Re: CL for Proxy Requests

Posted by Ian Holsman <ia...@cnet.com>.
Ryan Bloom wrote:

> On Friday 30 November 2001 10:34 am, Ian Holsman wrote:
> 
>>Ryan Bloom wrote:
>>
>>>On Friday 30 November 2001 10:24 am, Ian Holsman wrote:
>>>
>>>>Ryan Bloom wrote:
>>>>
>>>>>On Friday 30 November 2001 09:55 am, Ian Holsman wrote:
>>>>>
>>>>>>Ryan Bloom wrote:
>>>>>>
>>>>>>>On Friday 30 November 2001 03:42 am, Eli Marmor wrote:
>>>>>>>
>>>>>>>>Chuck Murcko wrote:
>>>>>>>>
>>>>>>>>>Also if the proxy is dechunking on its client side there will be no
>>>>>>>>>CL to send...
>>>>>>>>>
>>>>>>>>This is obvious. But this is already included in the rule: "there is
>>>>>>>>no C-L when a filter that may change the size of the response is
>>>>>>>>onvolved"; After all, chunking is only a particular case of a
>>>>>>>>filter...
>>>>>>>>
>>>>>>>>I think that we should supply a way (for a programmer) to tell Apache
>>>>>>>>that a specific filter doesn't change the size of a response. Or
>>>>>>>>doesn't change the size of specific reponses (using the contexts of
>>>>>>>>the conf, such as DIRECTORY, etc.). Or the hack that Ryan mentioned.
>>>>>>>>Because while browsers must support responses without C-L, they
>>>>>>>>depend on it for some purposes (e.g. the % of download of a file).
>>>>>>>>
>>>>>>>>Especially in proxies, where the backend site is not aware that the
>>>>>>>>C-L is removed by a proxy in the middle.
>>>>>>>>
>>>>>>>The hack is easy to add, and it is safer, I'll try to get to it this
>>>>>>>weekend if nobody beats me to it.
>>>>>>>
>>>>>>I think whats missing is the ability to add a filter on proxied
>>>>>>requests. something like ProxyAddOutputFilter/ProxyAddInputFilter
>>>>>>
>>>>>You can do that with the regular AddOutputFilter command in the
>>>>><proxy > block.  I have done this before.
>>>>>
>>>>not for reverse proxies
>>>>as you don't specify a proxy block.
>>>>
>>>Yeah, but even then, you should be able to use a Location block to add a
>>>filter for that URL.
>>>
>>OK.. now I understand the confusion.
>>I'm talking about adding filters to the actual call made to the other
>>server. (eg from web server to app) not from client to webserver.
>>
> 
> Yeah, but that is one of the problems with the proxy right now.  It doesn't use
> the correct mechanisms for creating the backend request.  If you remember,
> Danny Lopez asked for this ability a while ago, and we didn't implement it.


Yes.. I was on vaction at the time
we also use the same feature danny asked for (a hook pre-proxy request)
We're there any objections to adding the hook?


> In fact, I modified the proxy to use a hook for creating the request, which
> allows modules to insert their filters.  This would have allowed a module
> to hook the create_poxy_request, and add their own filters, but the proxy
> doesn't use the filters correctly.


if you give me a rundown on what needs to be done I'll do it.


> 
> Ryan
> 
> ______________________________________________________________
> Ryan Bloom				rbb@apache.org
> Covalent Technologies			rbb@covalent.net
> --------------------------------------------------------------
> 




Re: CL for Proxy Requests

Posted by Graham Leggett <mi...@sharp.fm>.
Ryan Bloom wrote:

> Yeah, but that is one of the problems with the proxy right now.  It doesn't use
> the correct mechanisms for creating theham backend request.  If you remember,
> Danny Lopez asked for this ability a while ago, and we didn't implement it.
> In fact, I modified the proxy to use a hook for creating the request, which
> allows modules to insert their filters.  This would have allowed a module
> to hook the create_poxy_request, and add their own filters, but the proxy
> doesn't use the filters correctly.

I don't understand enough about the "correct" way of using the filters
to see what is being done wrong - can you explain how it should be done?
When I have some time soon (when current project is off plate) I'll have
time to look at this.

Regards,
Gra
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

Re: CL for Proxy Requests

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 30 November 2001 10:34 am, Ian Holsman wrote:
> Ryan Bloom wrote:
> > On Friday 30 November 2001 10:24 am, Ian Holsman wrote:
> >>Ryan Bloom wrote:
> >>>On Friday 30 November 2001 09:55 am, Ian Holsman wrote:
> >>>>Ryan Bloom wrote:
> >>>>>On Friday 30 November 2001 03:42 am, Eli Marmor wrote:
> >>>>>>Chuck Murcko wrote:
> >>>>>>>Also if the proxy is dechunking on its client side there will be no
> >>>>>>> CL to send...
> >>>>>>
> >>>>>>This is obvious. But this is already included in the rule: "there is
> >>>>>> no C-L when a filter that may change the size of the response is
> >>>>>> onvolved"; After all, chunking is only a particular case of a
> >>>>>> filter...
> >>>>>>
> >>>>>>I think that we should supply a way (for a programmer) to tell Apache
> >>>>>>that a specific filter doesn't change the size of a response. Or
> >>>>>>doesn't change the size of specific reponses (using the contexts of
> >>>>>>the conf, such as DIRECTORY, etc.). Or the hack that Ryan mentioned.
> >>>>>>Because while browsers must support responses without C-L, they
> >>>>>> depend on it for some purposes (e.g. the % of download of a file).
> >>>>>>
> >>>>>>Especially in proxies, where the backend site is not aware that the
> >>>>>> C-L is removed by a proxy in the middle.
> >>>>>
> >>>>>The hack is easy to add, and it is safer, I'll try to get to it this
> >>>>>weekend if nobody beats me to it.
> >>>>
> >>>>I think whats missing is the ability to add a filter on proxied
> >>>> requests. something like ProxyAddOutputFilter/ProxyAddInputFilter
> >>>
> >>>You can do that with the regular AddOutputFilter command in the
> >>><proxy > block.  I have done this before.
> >>
> >>not for reverse proxies
> >>as you don't specify a proxy block.
> >
> > Yeah, but even then, you should be able to use a Location block to add a
> > filter for that URL.
>
> OK.. now I understand the confusion.
> I'm talking about adding filters to the actual call made to the other
> server. (eg from web server to app) not from client to webserver.

Yeah, but that is one of the problems with the proxy right now.  It doesn't use
the correct mechanisms for creating the backend request.  If you remember,
Danny Lopez asked for this ability a while ago, and we didn't implement it.
In fact, I modified the proxy to use a hook for creating the request, which
allows modules to insert their filters.  This would have allowed a module
to hook the create_poxy_request, and add their own filters, but the proxy
doesn't use the filters correctly.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: CL for Proxy Requests

Posted by Ian Holsman <ia...@cnet.com>.
Ryan Bloom wrote:

> On Friday 30 November 2001 10:24 am, Ian Holsman wrote:
> 
>>Ryan Bloom wrote:
>>
>>>On Friday 30 November 2001 09:55 am, Ian Holsman wrote:
>>>
>>>>Ryan Bloom wrote:
>>>>
>>>>>On Friday 30 November 2001 03:42 am, Eli Marmor wrote:
>>>>>
>>>>>>Chuck Murcko wrote:
>>>>>>
>>>>>>>Also if the proxy is dechunking on its client side there will be no CL
>>>>>>>to send...
>>>>>>>
>>>>>>This is obvious. But this is already included in the rule: "there is no
>>>>>>C-L when a filter that may change the size of the response is
>>>>>>onvolved"; After all, chunking is only a particular case of a
>>>>>>filter...
>>>>>>
>>>>>>I think that we should supply a way (for a programmer) to tell Apache
>>>>>>that a specific filter doesn't change the size of a response. Or
>>>>>>doesn't change the size of specific reponses (using the contexts of
>>>>>>the conf, such as DIRECTORY, etc.). Or the hack that Ryan mentioned.
>>>>>>Because while browsers must support responses without C-L, they depend
>>>>>>on it for some purposes (e.g. the % of download of a file).
>>>>>>
>>>>>>Especially in proxies, where the backend site is not aware that the C-L
>>>>>>is removed by a proxy in the middle.
>>>>>>
>>>>>The hack is easy to add, and it is safer, I'll try to get to it this
>>>>>weekend if nobody beats me to it.
>>>>>
>>>>I think whats missing is the ability to add a filter on proxied requests.
>>>>something like ProxyAddOutputFilter/ProxyAddInputFilter
>>>>
>>>You can do that with the regular AddOutputFilter command in the
>>><proxy > block.  I have done this before.
>>>
>>not for reverse proxies
>>as you don't specify a proxy block.
>>
> 
> Yeah, but even then, you should be able to use a Location block to add a 
> filter for that URL.
> 

OK.. now I understand the confusion.
I'm talking about adding filters to the actual call made to the other server.
(eg from web server to app) not from client to webserver.


> Ryan
> 
> ______________________________________________________________
> Ryan Bloom				rbb@apache.org
> Covalent Technologies			rbb@covalent.net
> --------------------------------------------------------------
> 




Re: CL for Proxy Requests

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 30 November 2001 10:24 am, Ian Holsman wrote:
> Ryan Bloom wrote:
> > On Friday 30 November 2001 09:55 am, Ian Holsman wrote:
> >>Ryan Bloom wrote:
> >>>On Friday 30 November 2001 03:42 am, Eli Marmor wrote:
> >>>>Chuck Murcko wrote:
> >>>>>Also if the proxy is dechunking on its client side there will be no CL
> >>>>>to send...
> >>>>
> >>>>This is obvious. But this is already included in the rule: "there is no
> >>>>C-L when a filter that may change the size of the response is
> >>>> onvolved"; After all, chunking is only a particular case of a
> >>>> filter...
> >>>>
> >>>>I think that we should supply a way (for a programmer) to tell Apache
> >>>>that a specific filter doesn't change the size of a response. Or
> >>>> doesn't change the size of specific reponses (using the contexts of
> >>>> the conf, such as DIRECTORY, etc.). Or the hack that Ryan mentioned.
> >>>> Because while browsers must support responses without C-L, they depend
> >>>> on it for some purposes (e.g. the % of download of a file).
> >>>>
> >>>>Especially in proxies, where the backend site is not aware that the C-L
> >>>>is removed by a proxy in the middle.
> >>>
> >>>The hack is easy to add, and it is safer, I'll try to get to it this
> >>>weekend if nobody beats me to it.
> >>
> >>I think whats missing is the ability to add a filter on proxied requests.
> >>something like ProxyAddOutputFilter/ProxyAddInputFilter
> >
> > You can do that with the regular AddOutputFilter command in the
> > <proxy > block.  I have done this before.
>
> not for reverse proxies
> as you don't specify a proxy block.

Yeah, but even then, you should be able to use a Location block to add a 
filter for that URL.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: CL for Proxy Requests

Posted by Ian Holsman <ia...@cnet.com>.
Ryan Bloom wrote:

> On Friday 30 November 2001 09:55 am, Ian Holsman wrote:
> 
>>Ryan Bloom wrote:
>>
>>>On Friday 30 November 2001 03:42 am, Eli Marmor wrote:
>>>
>>>>Chuck Murcko wrote:
>>>>
>>>>>Also if the proxy is dechunking on its client side there will be no CL
>>>>>to send...
>>>>>
>>>>This is obvious. But this is already included in the rule: "there is no
>>>>C-L when a filter that may change the size of the response is onvolved";
>>>>After all, chunking is only a particular case of a filter...
>>>>
>>>>I think that we should supply a way (for a programmer) to tell Apache
>>>>that a specific filter doesn't change the size of a response. Or doesn't
>>>>change the size of specific reponses (using the contexts of the conf,
>>>>such as DIRECTORY, etc.). Or the hack that Ryan mentioned. Because while
>>>>browsers must support responses without C-L, they depend on it for some
>>>>purposes (e.g. the % of download of a file).
>>>>
>>>>Especially in proxies, where the backend site is not aware that the C-L
>>>>is removed by a proxy in the middle.
>>>>
>>>The hack is easy to add, and it is safer, I'll try to get to it this
>>>weekend if nobody beats me to it.
>>>
>>I think whats missing is the ability to add a filter on proxied requests.
>>something like ProxyAddOutputFilter/ProxyAddInputFilter
>>
> 
> You can do that with the regular AddOutputFilter command in the
> <proxy > block.  I have done this before.


not for reverse proxies
as you don't specify a proxy block.


> 
> Ryan
> 
> ______________________________________________________________
> Ryan Bloom				rbb@apache.org
> Covalent Technologies			rbb@covalent.net
> --------------------------------------------------------------
> 




Re: CL for Proxy Requests

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 30 November 2001 09:55 am, Ian Holsman wrote:
> Ryan Bloom wrote:
> > On Friday 30 November 2001 03:42 am, Eli Marmor wrote:
> >>Chuck Murcko wrote:
> >>>Also if the proxy is dechunking on its client side there will be no CL
> >>>to send...
> >>
> >>This is obvious. But this is already included in the rule: "there is no
> >>C-L when a filter that may change the size of the response is onvolved";
> >>After all, chunking is only a particular case of a filter...
> >>
> >>I think that we should supply a way (for a programmer) to tell Apache
> >>that a specific filter doesn't change the size of a response. Or doesn't
> >>change the size of specific reponses (using the contexts of the conf,
> >>such as DIRECTORY, etc.). Or the hack that Ryan mentioned. Because while
> >>browsers must support responses without C-L, they depend on it for some
> >>purposes (e.g. the % of download of a file).
> >>
> >>Especially in proxies, where the backend site is not aware that the C-L
> >>is removed by a proxy in the middle.
> >
> > The hack is easy to add, and it is safer, I'll try to get to it this
> > weekend if nobody beats me to it.
>
> I think whats missing is the ability to add a filter on proxied requests.
> something like ProxyAddOutputFilter/ProxyAddInputFilter

You can do that with the regular AddOutputFilter command in the
<proxy > block.  I have done this before.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: CL for Proxy Requests

Posted by Ian Holsman <ia...@cnet.com>.
Ryan Bloom wrote:

> On Friday 30 November 2001 03:42 am, Eli Marmor wrote:
> 
>>Chuck Murcko wrote:
>>
>>>Also if the proxy is dechunking on its client side there will be no CL
>>>to send...
>>>
>>This is obvious. But this is already included in the rule: "there is no
>>C-L when a filter that may change the size of the response is onvolved";
>>After all, chunking is only a particular case of a filter...
>>
>>I think that we should supply a way (for a programmer) to tell Apache
>>that a specific filter doesn't change the size of a response. Or doesn't
>>change the size of specific reponses (using the contexts of the conf,
>>such as DIRECTORY, etc.). Or the hack that Ryan mentioned. Because while
>>browsers must support responses without C-L, they depend on it for some
>>purposes (e.g. the % of download of a file).
>>
>>Especially in proxies, where the backend site is not aware that the C-L
>>is removed by a proxy in the middle.
>>
> 
> The hack is easy to add, and it is safer, I'll try to get to it this weekend if
> nobody beats me to it.


I think whats missing is the ability to add a filter on proxied requests.
something like ProxyAddOutputFilter/ProxyAddInputFilter


> 
> Ryan
> 
> 
> ______________________________________________________________
> Ryan Bloom				rbb@apache.org
> Covalent Technologies			rbb@covalent.net
> --------------------------------------------------------------
> 




Re: CL for Proxy Requests

Posted by Ryan Bloom <rb...@covalent.net>.
On Friday 30 November 2001 03:42 am, Eli Marmor wrote:
> Chuck Murcko wrote:
> > Also if the proxy is dechunking on its client side there will be no CL
> > to send...
>
> This is obvious. But this is already included in the rule: "there is no
> C-L when a filter that may change the size of the response is onvolved";
> After all, chunking is only a particular case of a filter...
>
> I think that we should supply a way (for a programmer) to tell Apache
> that a specific filter doesn't change the size of a response. Or doesn't
> change the size of specific reponses (using the contexts of the conf,
> such as DIRECTORY, etc.). Or the hack that Ryan mentioned. Because while
> browsers must support responses without C-L, they depend on it for some
> purposes (e.g. the % of download of a file).
>
> Especially in proxies, where the backend site is not aware that the C-L
> is removed by a proxy in the middle.

The hack is easy to add, and it is safer, I'll try to get to it this weekend if
nobody beats me to it.

Ryan


______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: CL for Proxy Requests

Posted by Chuck Murcko <ch...@topsail.org>.
On Friday, November 30, 2001, at 06:42 , Eli Marmor wrote:

> Chuck Murcko wrote:
>
>> Also if the proxy is dechunking on its client side there will be no CL
>> to send...
>
> This is obvious. But this is already included in the rule: "there is no
> C-L when a filter that may change the size of the response is onvolved";
> After all, chunking is only a particular case of a filter...

But it's not so obvious that the same entity may be returned from a 
cache *with* a C-L. So you will also have filters that put a C-L back on.

>
> I think that we should supply a way (for a programmer) to tell Apache
> that a specific filter doesn't change the size of a response. Or doesn't
> change the size of specific reponses (using the contexts of the conf,
> such as DIRECTORY, etc.). Or the hack that Ryan mentioned. Because while
> browsers must support responses without C-L, they depend on it for some
> purposes (e.g. the % of download of a file).
>
> Especially in proxies, where the backend site is not aware that the C-L
> is removed by a proxy in the middle.
>

The proxy in 2.0 should return a C-L if it is possible to do so from the 
origin server.

Chuck


Re: CL for Proxy Requests

Posted by Eli Marmor <ma...@netmask.it>.
Chuck Murcko wrote:

> Also if the proxy is dechunking on its client side there will be no CL
> to send...

This is obvious. But this is already included in the rule: "there is no
C-L when a filter that may change the size of the response is onvolved";
After all, chunking is only a particular case of a filter...

I think that we should supply a way (for a programmer) to tell Apache
that a specific filter doesn't change the size of a response. Or doesn't
change the size of specific reponses (using the contexts of the conf,
such as DIRECTORY, etc.). Or the hack that Ryan mentioned. Because while
browsers must support responses without C-L, they depend on it for some
purposes (e.g. the % of download of a file).

Especially in proxies, where the backend site is not aware that the C-L
is removed by a proxy in the middle.

-- 
Eli Marmor
marmor@netmask.it
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.:   +972-9-766-1020          8 Yad-Harutzim St.
Fax.:   +972-9-766-1314          P.O.B. 7004
Mobile: +972-50-23-7338          Kfar-Saba 44641, Israel

Re: CL for Proxy Requests

Posted by Chuck Murcko <ch...@topsail.org>.
Also if the proxy is dechunking on its client side there will be no CL 
to send...

Chuck

On Thursday, November 29, 2001, at 11:20 , Ryan Bloom wrote:

> On Thursday 29 November 2001 08:01 pm, Eli Marmor wrote:
>> Content-Length is not passed through proxy requests, when Apache 2.0 is
>> used as the proxy.
>>
>> Is it a bug?
>> Feature?
>> Limitation?
>>
>> Or is it just me?  My configuration?
>>
>> Many clients depend on this data, for example audio/video players, so
>> it is quite bad to lack CL.
>>
>> Is there any way to tell the API that the filters don't change the
>> response size so the original CL can be used?
>
> There is no way to do that, because you will never know if filters 
> changed the
> data or not.  The reason we don't return a C-L, is that we don't have 
> all of the
> data, so we can't computer the C-L.  There is a possibility that we 
> could fix this,
> with a hack. Basically, have the C-L filter check to see if the only 
> bucket is a
> socket bucket or a pipe bucket.  If so, leave the C-L alone.  We can be
> sure that the data hasn't been changed in that case.  If the only 
> bucket is
> any other type, we will automagically compute the C-L.
>


Re: CL for Proxy Requests

Posted by Ryan Bloom <rb...@covalent.net>.
On Thursday 29 November 2001 08:01 pm, Eli Marmor wrote:
> Content-Length is not passed through proxy requests, when Apache 2.0 is
> used as the proxy.
>
> Is it a bug?
> Feature?
> Limitation?
>
> Or is it just me?  My configuration?
>
> Many clients depend on this data, for example audio/video players, so
> it is quite bad to lack CL.
>
> Is there any way to tell the API that the filters don't change the
> response size so the original CL can be used?

There is no way to do that, because you will never know if filters changed the
data or not.  The reason we don't return a C-L, is that we don't have all of the
data, so we can't computer the C-L.  There is a possibility that we could fix this,
with a hack. Basically, have the C-L filter check to see if the only bucket is a 
socket bucket or a pipe bucket.  If so, leave the C-L alone.  We can be
sure that the data hasn't been changed in that case.  If the only bucket is
any other type, we will automagically compute the C-L.

Ryan


______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------