Chunked transfer encoding + gzip

Asked by Igor

I'm writing a content filter for squid using eCAP.
I successfuly parse gzipped streams and uncompressed streams, but when it's chunked + gzip, the chunks that arrive as virgin bytes are not a valid gzip stream when combined, i.e. when passed to z stream same way as I pass them for non-chunked cases.

I've looked at raw virgin bytes caught in Fiddler and in the code, and it seems that content comes de-chunked. Or the chunks are split too. What does adapter recieve in case of chunked encoding?

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Rousskov
Solved:
Last query:
Last reply:
Revision history for this message
Igor (i-um) said :
#1

Example of alway-chunked data is http://maps.yandex.ru

Revision history for this message
Best Alex Rousskov (rousskov) said :
#2

In case of chunked (or any other) transfer encoding, an eCAP adapter should receive dechunked/raw content. If the adapter receives chunked content, it is a host application bug.

Revision history for this message
Igor (i-um) said :
#3

Update: in some cases chunks that arrive are parts of gzip stream and can be decoded incrementally, and in some every chunk contains a header.

Revision history for this message
Igor (i-um) said :
#4

OK, seems unchunked always, no extra data is present in vb

Revision history for this message
Igor (i-um) said :
#5

Thanks Alex Rousskov, that solved my question.