MCPcopy Index your code
hub / github.com/rawpython/remi / parse_session_cookie

Function parse_session_cookie

remi/server.py:106–119  ·  view source on GitHub ↗

cookie_to_cook = http_header['cookie']

(cookie_to_cook)

Source from the content-addressed store, hash-verified

104
105
106def parse_session_cookie(cookie_to_cook):
107 """ cookie_to_cook = http_header['cookie']
108 """
109 #print("cookie_to_cook: %s"%str(cookie_to_cook))
110 session_value = None
111 tokens = cookie_to_cook.split(";")
112 for tok in tokens:
113 if 'remi_session=' in tok:
114 #print("found session id: %s"%str(tok))
115 try:
116 session_value = int(tok.replace('remi_session=', ''))
117 except Exception:
118 pass
119 return session_value
120
121
122class WebSocketsHandler(socketserver.StreamRequestHandler):

Callers 2

handshakeMethod · 0.85
_instanceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected