Skip to content

Commit d48edc2

Browse files
committed
Moved the set-cookie header setup.
1 parent 6889eeb commit d48edc2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

examples/widgets_overview_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,4 @@ def on_close(self):
323323
# optional parameters
324324
# start(MyApp,address='127.0.0.1', port=8081, multiple_instance=False,enable_file_cache=True, update_interval=0.1, start_browser=True)
325325
import ssl
326-
start(MyApp, debug=True, address='0.0.0.0', port=0, start_browser=True, multiple_instance=True)
326+
start(MyApp, debug=True, address='0.0.0.0', port=0, start_browser=True, multiple_instance=False)

remi/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ def _instance(self):
339339
self.session = int(time.time()*1000)
340340
#send session to browser
341341
del self.headers['cookie']
342-
self.send_header("Set-Cookie", "remi_session=%s"%(self.session))
343342

344343
if not(self.session in clients):
345344
runtimeInstances[str(id(self))] = self
@@ -833,6 +832,7 @@ def _process_all(self, func):
833832
html = self.client.root.repr()
834833

835834
self.send_response(200)
835+
self.send_header("Set-Cookie", "remi_session=%s"%(self.session))
836836
self.send_header('Content-type', 'text/html')
837837
self.end_headers()
838838
self.wfile.write(encode_text("<!DOCTYPE html>\n"))

0 commit comments

Comments
 (0)