bbangert/velruse — Issue #29: Twitter Provider on Mac Webkit enabled browsers receives close
Author: cd34
Created: 2011-11-24 18:04:50+00:00
State: open

I ran into a similar issue to https://github.com/Pylons/pyramid/issues/212 however, I don't know if my situation is merely the same symptom but a separate cause.

In this case, in provider/twitter.py:

r = requests.get(REQUEST_URL, headers=oauth_request.to_header())

modifies the request object which causes Mac based Webkit browsers to have a problem due to the corruption and high order bits in the request. Firefox 8/9 appear to have no issue.

save_request = copy.copy(request)
r = requests.get(REQUEST_URL, headers=oauth_request.to_header())
request = copy.copy(save_request)

The above fix hides the bug and allows it to work, but, something in requests is changing a mutable that Pyramid is depending on.

https://github.com/cd34/velruse/commit/bc0ff123d59bddb7ee2657f6689cc4af2638d7d2

is the commit on my local branch that 'fixes' it, however, I'm not sure I really like the fix as it only covers up a problem in a dependency. I can submit a pull if you would like, but, it isn't "The Right Fix". It is possible that the issue is in paster as requests does start a new urllib3 connection pool and perhaps that is creating a leak.