tornadoweb / tornado

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
http://www.tornadoweb.org/
Apache License 2.0
21.69k stars 5.5k forks source link

sth wrong with running demo/chat #1440

Closed xiazhibin closed 9 years ago

xiazhibin commented 9 years ago

i run the demo 'chat'.

input 'localhost:8888' in my chrome but from the terminal,it returns 302 .

so i delete all handlers except MainHandler and change the MainHandler like this:

class MainHandler(BaseHandler): def get(self): self.wirte('hello') and then it works.

i guess my path is sth wrong,but i am not sure. i can not solve this problem.

my workspace is mac ,python3.4.2.the demo 'chat' run on virtualenv

bdarnell commented 9 years ago

A 302 is perfectly normal here: it is redirecting you to a login page. You must follow the redirects, log in, and obtain a cookie to continue.

xiazhibin commented 9 years ago

but saddly,it redict to /auth/login which is still return 302.......

bdarnell commented 9 years ago

Yes, and then /auth/login redirects to a google login page; you must follow that redirect too.

But google recently turned off their OpenID service so I don't think this works any more. You should use the version of chatdemo from the master branch (https://github.com/tornadoweb/tornado/tree/master/demos/chat) which no longer does authentication.

xiazhibin commented 9 years ago

thanks a lot!!!