Skip to content

Commit

Permalink
Cookie endpoint issue solved
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrrr committed Sep 10, 2012
1 parent 586c44e commit 4a5aa82
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tornadio2/session.py
Expand Up @@ -100,7 +100,7 @@ def __init__(self, conn, server, request, expiry=None):
self.conn = conn(self)

# Call on_open.
info = ConnectionInfo(request.remote_ip,
self.info = ConnectionInfo(request.remote_ip,
request.arguments,
request.cookies)

Expand All @@ -115,7 +115,7 @@ def __init__(self, conn, server, request, expiry=None):
# Endpoints
self.endpoints = dict()

result = self.conn.on_open(info)
result = self.conn.on_open(self.info)
if result is not None and not result:
raise HTTPError(401)

Expand Down Expand Up @@ -304,9 +304,7 @@ def connect_endpoint(self, url):

args = urlparse.parse_qs(urldata.query)

info = ConnectionInfo(self.remote_ip, args, dict())

if conn.on_open(info) == False:
if conn.on_open(self.info) == False:
self.disconnect_endpoint(endpoint)

def disconnect_endpoint(self, endpoint):
Expand Down

0 comments on commit 4a5aa82

Please sign in to comment.