web/application.py
changeset 6570 7e9a1a5919e8
parent 6427 c8a5ac2d1eaa
child 6582 8eb7883b4223
equal deleted inserted replaced
6569:806b53dc5474 6570:7e9a1a5919e8
   214 
   214 
   215     def open_session(self, req):
   215     def open_session(self, req):
   216         session = self.session_manager.open_session(req)
   216         session = self.session_manager.open_session(req)
   217         cookie = req.get_cookie()
   217         cookie = req.get_cookie()
   218         cookie[self.SESSION_VAR] = session.sessionid
   218         cookie[self.SESSION_VAR] = session.sessionid
       
   219         if req.https:
       
   220             cookie[self.SESSION_VAR]['secure'] = True
   219         req.set_cookie(cookie, self.SESSION_VAR, maxage=None)
   221         req.set_cookie(cookie, self.SESSION_VAR, maxage=None)
   220         if not session.anonymous_session:
   222         if not session.anonymous_session:
   221             self._postlogin(req)
   223             self._postlogin(req)
   222         return session
   224         return session
   223 
   225