Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Compression, and disabling transfer-encoding of chunks

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Hosting multiple sites on one server  
Author Message
bill

External


Since: Nov 07, 2007
Posts: 1



(Msg. 1) Posted: Wed Nov 07, 2007 8:04 pm
Post subject: Compression, and disabling transfer-encoding of chunks
Archived from groups: microsoft>public>inetserver>iis (more info?)

The quick version of my question: Is there a way I can prevent IIS 6
from doing chunked transfer encoding? I'm aware of the
AspEnableChunkedEncoding metabase property, and I've set it to FALSE
at several places in the server/site hierarchy in metabase.xml, yet I
still get chunked encoding (with response header Tranfer-Encoding:
chunked) and I'd like to disable that.

The long version: I have IIS 6 built-in compression working very
nicely... except when I put a Squid proxy between the browser and
IIS. At first IIS stopped giving compression altogether because it
got http 1.0 requests from Squid, so I set both
HcNoCompressionForHttp10 and HcNoCompressionForProxies to FALSE. IIS
then resumed sending compressed data back to Squid (I can see this in
Wireshark), but (I think) Squid mucks it up and by the time it gets
back to the browser it's useless (IE7 shows a server error, whereas
Firefox just displays nothing at all). By sniffing between IIS and
Squid on the return trip, I can see the Transfer-encoding: chunked
header. My understanding from Squid folks is that it's incapable of
handling Transfer-encoding. So it would be nice to be able to test a
scenario wherein IIS6 still serves up compressed data, but does it
without chunking it.

Any ideas?

Thank you,
Bill

 >> Stay informed about: Compression, and disabling transfer-encoding of chunks 
Back to top
Login to vote
Anthony Jones

External


Since: Jan 28, 2006
Posts: 170



(Msg. 2) Posted: Wed Nov 07, 2007 8:04 pm
Post subject: Re: Compression, and disabling transfer-encoding of chunks [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"bill" <bill.dawson9 RemoveThis @gmail.com> wrote in message
news:1194471523.795682.274620@k79g2000hse.googlegroups.com...
> The quick version of my question: Is there a way I can prevent IIS 6
> from doing chunked transfer encoding? I'm aware of the
> AspEnableChunkedEncoding metabase property, and I've set it to FALSE
> at several places in the server/site hierarchy in metabase.xml, yet I
> still get chunked encoding (with response header Tranfer-Encoding:
> chunked) and I'd like to disable that.
>
> The long version: I have IIS 6 built-in compression working very
> nicely... except when I put a Squid proxy between the browser and
> IIS. At first IIS stopped giving compression altogether because it
> got http 1.0 requests from Squid, so I set both
> HcNoCompressionForHttp10 and HcNoCompressionForProxies to FALSE. IIS
> then resumed sending compressed data back to Squid (I can see this in
> Wireshark), but (I think) Squid mucks it up and by the time it gets
> back to the browser it's useless (IE7 shows a server error, whereas
> Firefox just displays nothing at all). By sniffing between IIS and
> Squid on the return trip, I can see the Transfer-encoding: chunked
> header. My understanding from Squid folks is that it's incapable of
> handling Transfer-encoding. So it would be nice to be able to test a
> scenario wherein IIS6 still serves up compressed data, but does it
> without chunking it.
>

Hmm... weird. Transfer-encoding: chunked is a HTTP/1.1 feature so it
shouldn't be used in a response to a HTTP/1.0 request. The
AspEnableChunkedEncoding property applies to asp generated content so I
doubt it would affect other parts of IIS that may choose to use chunked
encoding when servicing a http/1.1 request.

--
Anthony Jones - MVP ASP/ASP.NET

 >> Stay informed about: Compression, and disabling transfer-encoding of chunks 
Back to top
Login to vote
David Wang

External


Since: Nov 04, 2007
Posts: 333



(Msg. 3) Posted: Thu Nov 08, 2007 8:00 am
Post subject: Re: Compression, and disabling transfer-encoding of chunks [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Nov 7, 1:38 pm, bill <bill.daws... RemoveThis @gmail.com> wrote:
> The quick version of my question: Is there a way I can prevent IIS 6
> from doing chunked transfer encoding? I'm aware of the
> AspEnableChunkedEncoding metabase property, and I've set it to FALSE
> at several places in the server/site hierarchy in metabase.xml, yet I
> still get chunked encoding (with response header Tranfer-Encoding:
> chunked) and I'd like to disable that.
>
> The long version: I have IIS 6 built-in compression working very
> nicely... except when I put a Squid proxy between the browser and
> IIS. At first IIS stopped giving compression altogether because it
> got http 1.0 requests from Squid, so I set both
> HcNoCompressionForHttp10 and HcNoCompressionForProxies to FALSE. IIS
> then resumed sending compressed data back to Squid (I can see this in
> Wireshark), but (I think) Squid mucks it up and by the time it gets
> back to the browser it's useless (IE7 shows a server error, whereas
> Firefox just displays nothing at all). By sniffing between IIS and
> Squid on the return trip, I can see the Transfer-encoding: chunked
> header. My understanding from Squid folks is that it's incapable of
> handling Transfer-encoding. So it would be nice to be able to test a
> scenario wherein IIS6 still serves up compressed data, but does it
> without chunking it.
>
> Any ideas?
>
> Thank you,
> Bill


This just sounds like a bug in Squid.

How IIS sends compressed data depends on the type of compression
applied to it.
- Static Compression will send Content-Length + compressed data
(optionally cached on disk)
- Dynamic/Application Compression will send Transfer-Encoding: chunked
+ compressed data (and not cached).

You want to enable static compression and request a .htm file

The reason that IIS sends chunked encoding for Dynamic Compression --
IIS does not buffer application responses, so in order for it to
transparently compress application responses, it has to compress each
chunk on-the-fly as it is sent by the application, and only chunked
encoding handles this behavior.

Meanwhile, static compression applies to static, non-changing files --
where IIS can determine the content-length of the response which will
not dynamically change -- so IIS can cache these results to disk as
well as use content-length to indicate length of compressed response.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
 >> Stay informed about: Compression, and disabling transfer-encoding of chunks 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]