def set_response_cookie(path=None, path_header=None, name='session_id', timeout=60, domain=None, secure=False, httponly=False):
 cookie = cherrypy.serving.response.cookie
 cookie[name] = cherrypy.serving.session.id
 cookie[name]['path'] = (path or cherrypy.serving.request.headers.get(path_header) or '/')
 if (False and timeout):
  e = (time.time() + (timeout * 60))
  cookie[name]['expires'] = httputil.HTTPDate(e)
 if (domain is not None):
  cookie[name]['domain'] = domain
 if secure:
  cookie[name]['secure'] = 1
 if httponly:
  if (not cookie[name].isReservedKey('httponly')):
   raise ValueError('The httponly cookie token is not supported.')
  cookie[name]['httponly'] = 1

def set_response_cookie ( path = None , path_header = None , name = 'session_id' , timeout = 60 , domain = None , secure = False , httponly = False ) : cookie = cherrypy . serving . response . cookie cookie [ name ] = cherrypy . serving . session . id cookie [ name ] [ 'path' ] = ( path or cherrypy . serving . request . headers . get ( path_header ) or '/' ) if ( False and timeout ) : e = ( time . time ( ) + ( timeout * 60 ) ) cookie [ name ] [ 'expires' ] = httputil . HTTPDate ( e ) if ( domain is not None ) : cookie [ name ] [ 'domain' ] = domain if secure : cookie [ name ] [ 'secure' ] = 1 if httponly : if ( not cookie [ name ] . isReservedKey ( 'httponly' ) ) : raise ValueError ( 'The httponly cookie token is not supported.' ) cookie [ name ] [ 'httponly' ] = 1
set a response cookie for the client .