Announcing LittleProxy 0.1 based on Netty
Adam Fisk
a at littleshoot.org
Mon Nov 2 00:58:58 EST 2009
Interesting, Stephen, especially that it works for you with Opera. I
just tested with FireFox 3.5.4 and Chrome 3.0.195.27 both on Windows,
and both cannot read the chunked encoding.
I too am puzzled. The hard part is the testing cycles. I'm thinking it
might make the most sense to just run a server that returns that file
for every request, completely bypassing Netty and allowing us to
easily tweak details of the response.
It could be something I'm missing in the response headers as well. My
initial suspicion was that including the Content-Length with chunked
encoding would confuse the browser, but that was not true in FF in my
quick tests, and it appears to be OK with RFC 2616.
Anyway, Stephen, thanks for looking at it. This will be the basis for
the system for circumventing censors I think I mentioned earlier, so
it should hopefully do some good. I'm working with a couple people on
what we think could be a massive deployment to address the censorship
issue, but there's significant work to be done.
-Adam
On Sun, Nov 1, 2009 at 7:38 PM, Stephen Haberman
<stephen at exigencecorp.com> wrote:
>
>> 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
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
--
Adam Fisk
http://www.littleshoot.org | http://adamfisk.wordpress.com |
http://twitter.com/adamfisk
More information about the netty-users
mailing list