[twill] Twill sending wrong accept header

Christoph Zwerschke cito at online.de
Wed Aug 18 14:25:44 PDT 2010


In Twill 0.9, line 63 of browser.py sets

self._browser.addheaders = [("Accept", "text/html; */*")]

I think this is wrong, it needs to be

self._browser.addheaders = [("Accept", "text/html, */*")]

i.e. with a comma instead of the semicolon. See:
http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z3

Because Paste 1.7.4 crashes with such ill-formed accept headers,
I cannot test web apps running on Paste. I'll try to make Paste more 
permissive in that regard, but it should also be fixed here.

-- Christoph



More information about the twill mailing list