It seems that t2w is not working properly for compressed pages.
TEST URL: https://g6lfrbqd3krju3ek.tor2web.org/ .
KO: Does not work with a browser (safari/firefox):
KO: Does not work with curl with enabled compression
curl -v -v --compressed https://g6lfrbqd3krju3ek.tor2web.org/
But it works with Curl/Wget default parameter: (no compression by default)
curl -v -v https://g6lfrbqd3krju3ek.tor2web.org/
So it seems that there is something related to gzip compression.
This is actually not a problem with encoding, but it's related to Transfer-Encoding: chunked.
The naive thing I did is advertise that I only support HTTP 1.0, though web servers are not so kind to respect me :(.
This is a known issue with the twisted parts that I am using and some people have figured out a way to make it work, but it requires a little bit of effort.
I am going to dump here some related links and work on it as soon as I fix the other bugs:
In particular tx-pendrell appears to be a good choise, though it is very poorly documented (even worse than twisted :P), but they have an implementation of a client that works with chunked transfer encoding. It needs some work to get it to fit to tor2web though:
Fix issue with gzip compressed page #3
I found a workaround for this. If the client advertised to not support gzip nginx will not send transfer-encoding: chunked. I will for the moment close this ticket.