Cannot update Twitter status behind proxy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gwibber |
New
|
Undecided
|
Unassigned |
Bug Description
I am using Gwibber on an up-to-date Ubuntu 12.10 machine, with Python 2.7.3 and Gwibber 3.6.0.
Updating the Twitter status works when running Gwibber without a HTTP proxy. When using a proxy, the update fails.
The gwibber.log shows this generic error message.
Network Thread-1 : ERROR - Network failure: UNKNOWN
The actual error is:
Network Thread-1 : ERROR - Network failure: maximum recursion depth exceeded
Traceback (most recent call last):
File "/usr/lib/
self.res = urllib2.
File "/usr/lib/
return _opener.open(url, data, timeout)
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
'_open', req)
File "/usr/lib/
result = func(*args)
File "/usr/lib/
return self.do_
File "/usr/lib/
h.putreques
File "/usr/lib/
return self.__r_host
File "/usr/lib/
return getattr(self, attr)
File "/usr/lib/
return getattr(self, attr)
File "/usr/lib/
return getattr(self, attr)
File "/usr/lib/
return getattr(self, attr)
...
After digging a bit in the code, I noticed this monkey patching in gwibber/
...
urllib2.
urllib2.HTTPHandler = newHTTPHandler
...
urllib2.
...
If I comment out those three lines, updating the Twitter status works for me again, even behind a proxy.
If the modified handlers are still necessary, they may need some update to work with Python 2.7.3 urllib2?