axacheng / zeepool

Automatically exported from code.google.com/p/zeepool
0 stars 0 forks source link

Weibo cookie needs to be correcting. #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Click Weibo login icon, then it'd go through OAuth2.0 protocol to get user's 
access token. 
2. Once we got access token, then we'd set cookie on client browser as 
'weibo_user'
3. But our home.py login UserLoginHandler() method can't get cookie correctly, 
so user would get :

Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
    handler.get(*groups)
  File "/base/data/home/apps/zeepooling/10.358739907108598800/weibo_oauth_v2.py", line 124, in get
    expires=time.time() + 30 * 86400)
  File "/base/data/home/apps/zeepooling/10.358739907108598800/weibo_oauth_v2.py", line 150, in set_cookie
    response.headers._headers.append(("Set-Cookie", cookie.output()[12:]))
  File "/base/data/home/apps/zeepooling/10.358739907108598800/weibo.py", line 47, in __getattr__
    return self[attr]
KeyError: 'headers'

We should fix BaseHandler() at weibo_oauth_v2.py .

Original issue reported on code.google.com by axa.ch...@gmail.com on 7 May 2012 at 5:58

GoogleCodeExporter commented 9 years ago
fixed on Revision: 672e66123a52

Original comment by axa.ch...@gmail.com on 8 May 2012 at 5:37

GoogleCodeExporter commented 9 years ago
fixed on Revision: 672e66123a52

Original comment by axa.ch...@gmail.com on 8 May 2012 at 5:37