[twill] gzip'd HTML request

John J Lee jjl at pobox.com
Thu Feb 25 12:15:27 PST 2010


On Thu, 25 Feb 2010, Angelo Romano wrote:

> Hallo everybody,
> I have a problem with twill, as I need to test an application forcing
> "Accept-Encoding: gzip, deflate" into the HTTP request. This can be
> easily done through twill, however gzip'd pages cannot be uncompressed
> as far as I know. I am aware a experimental feature for that was
> available in mechanize (which is also part of twill), but
> unfortunately I have no idea about how to use it - if it can be used.
> Any ideas?

Somewhere in twill there'll be an Browser instance (possibly a subclass). 
You need to call .add_handler on that, with an HTTPGzipProcessor instance 
as the single argument.


John




More information about the twill mailing list