You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Christoph Gröver <gr...@sitepark.com> on 2009/11/09 19:06:37 UTC

Preventing the use of chunked TF encoding while content-filtering

Hello list,


I have written a module which does filtering the content.

It gets those buckets and works on them and passes on the brigade of
buckets. OK, works perfect for nearly all conditions.

Execpt ....

When the user runs the infamous Internet Explorer and uses a
misconfigured proxy, it doesn't.

With the help of some debugging we have found out what happens: The
proxy is not HTTP/1.1-aware, which means it just changes the
HTTP-response to be HTTP/1.0, but it keeps the 
'chunked transfer encoding' of the original content.

Almost all browsers recognize that it's still chunked although the
header claims to be HTTP/1.0 and do the right thing.

MSIE doesn't. It gives the user the content and displays it with those
hex encoded chunk lengths in it.

Of course, this breaks website design and often the functionality.

So, what can we do about it?

We cannot change the proxy people are using and we cannot fix their
misconfigured proxies (or their broken proxies).

We cannot tell them to not use MSIE, either.


So we should tell the Apache Webserver to not use 'chunked transfer
encoding'. I thought this might be possible by just saying

r->chunked = FALSE;

But it didn't help.

So after some talking: Is there a way to get rid of CTFE ?

Perhaps if we collect all the chunks, put it in one chunk and set a
ContentLength-Header ?

Or is there another trick to do this?

Greetings from Münster, looking forward to your ideas.

-- 
Christoph Gröver, grover@sitepark.com
Sitepark GmbH, Gesellschaft für Informationsmanagement, AG Münster, HRB
5017 Rothenburg 14-16, D-48143 Münster, Telefon (0251) 48265-50
Geschäftsführer: Dipl.-Phys. Martin Kurze, Dipl.-Des. Thorsten Liebold

Re: Preventing the use of chunked TF encoding while content-filtering

Posted by Christoph Gröver <gr...@sitepark.com>.
Hello Anthony,

> I had a mod_buffer module written for me by Konstantin Chuguev
> (konstantin@chuguev.com) which collects chunks and buffers them for
> transfer in one shot. You should contact him and see whether he'll
> give/license it to you.

Thank you for your answer.

Does this mean that collecting the chunks and transfering them in one
shot will solve my problem?

Do you know for sure that by this I will be able to circumvent the use
of chunked transfer encoding?

I will program it myself, but I wanted to be sure that this will help
before I start implementing it.

Bye

-- 
Christoph Gröver, grover@sitepark.com
Sitepark GmbH, Gesellschaft für Informationsmanagement, AG Münster, HRB
5017 Rothenburg 14-16, D-48143 Münster, Telefon (0251) 48265-50
Geschäftsführer: Dipl.-Phys. Martin Kurze, Dipl.-Des. Thorsten Liebold

RE: Preventing the use of chunked TF encoding while content-filtering

Posted by "Anthony J. Biacco" <ab...@formatdynamics.com>.
Christoph,

I had a mod_buffer module written for me by Konstantin Chuguev (konstantin@chuguev.com) which collects chunks and buffers them for transfer in one shot.
You should contact him and see whether he'll give/license it to you.

-Tony
---------------------------
Manager, IT Operations
Format Dynamics, Inc.
303-573-1800x27
abiacco@formatdynamics.com
http://www.formatdynamics.com

> -----Original Message-----
> From: Christoph Gröver [mailto:grover@sitepark.com]
> Sent: Monday, November 09, 2009 11:07 AM
> To: modules-dev@httpd.apache.org
> Subject: Preventing the use of chunked TF encoding while content-
> filtering
> 
> 
> Hello list,
> 
> 
> I have written a module which does filtering the content.
> 
> It gets those buckets and works on them and passes on the brigade of
> buckets. OK, works perfect for nearly all conditions.
> 
> Execpt ....
> 
> When the user runs the infamous Internet Explorer and uses a
> misconfigured proxy, it doesn't.
> 
> With the help of some debugging we have found out what happens: The
> proxy is not HTTP/1.1-aware, which means it just changes the
> HTTP-response to be HTTP/1.0, but it keeps the
> 'chunked transfer encoding' of the original content.
> 
> Almost all browsers recognize that it's still chunked although the
> header claims to be HTTP/1.0 and do the right thing.
> 
> MSIE doesn't. It gives the user the content and displays it with those
> hex encoded chunk lengths in it.
> 
> Of course, this breaks website design and often the functionality.
> 
> So, what can we do about it?
> 
> We cannot change the proxy people are using and we cannot fix their
> misconfigured proxies (or their broken proxies).
> 
> We cannot tell them to not use MSIE, either.
> 
> 
> So we should tell the Apache Webserver to not use 'chunked transfer
> encoding'. I thought this might be possible by just saying
> 
> r->chunked = FALSE;
> 
> But it didn't help.
> 
> So after some talking: Is there a way to get rid of CTFE ?
> 
> Perhaps if we collect all the chunks, put it in one chunk and set a
> ContentLength-Header ?
> 
> Or is there another trick to do this?
> 
> Greetings from Münster, looking forward to your ideas.
> 
> --
> Christoph Gröver, grover@sitepark.com
> Sitepark GmbH, Gesellschaft für Informationsmanagement, AG Münster, HRB
> 5017 Rothenburg 14-16, D-48143 Münster, Telefon (0251) 48265-50
> Geschäftsführer: Dipl.-Phys. Martin Kurze, Dipl.-Des. Thorsten Liebold