Announcing LittleProxy 0.1 based on Netty

Stephen Haberman stephen at exigencecorp.com
Sun Nov 1 22:38:31 EST 2009


> and I ultimately included the decoder because many folks out there
> using proxies need to modify the responses in some way.

Agreed.

> So, for some reason FireFox doesn't understand HttpResponseDecoder's
> chunked encoding. The odd part is I've manually decoded the chunked
> encoding to try to find where it's off, and it looks perfect.

You're right.

I retract my earlier claim about DefaultHttpChunk not having all of the
bytes from the proxy--a few wireshark traces shows its all there.  Plus
looking at the code, I saw it doing a buffer copy. So, I'm not sure why
my proxy is exceptioning out, but it looks to be unrelated.

So, ignoring my proxy for now, I saved the wireshark captures for
fetching that file a) directly and b) via LittleProxy into two
corresponding files image-raw.txt and image-chunked.txt.

Then I could test them without netty involved via netcat:

    cat <file> | nc -q 1 -l -p 8080

Sure enough, firefox loads the image with image-raw.txt but does not
with image-chunked.txt.

Also, it turns out Opera (on Ubuntu) loads both images just fine. Chrome
(4.x unstable) loads the raw image but fails on the chunked, just like
Firefox. Not sure why Opera seems to have different decoding semantics
than Chrome and Firefox--that just seems weird. But with using netcat
+ the static files, I can't think of what else it would be.

Using vim, I stripped out the 3 chunk size prefixes, and then
image-raw.txt and image-chunked.txt are exactly the same. So, no data
corruption seems to be happening.

This is puzzling.

- Stephen



More information about the netty-users mailing list