コード例 #1
0
ファイル: headers.py プロジェクト: Giotoc/ACR
	def setcookie(self,env,config):
		#if config[1]["action"].lower()=="set":
		d={"name":replaceVars(env,config["name"],fn=str), "value":replaceVars(env,config["value"])}
		if config.has_key("path"):
			d["path"]=replaceVars(env,config["path"])
		HTTP.setCookie(env,d)
		return {}
コード例 #2
0
ファイル: __init__.py プロジェクト: Giotoc/ACR
	def deleteCookie(self):
		#log.info("Deleting session cookie")
		t=time.time()-10000
		#log.debug("Session cookie deleted by setting date to %s",t)
		HTTP.setCookie(self.env,{"name":"SESS", "value":"", "date":t})
		return
コード例 #3
0
ファイル: __init__.py プロジェクト: Giotoc/ACR
	def create(self):
		#print("executed, function with no parameters")
		self.sessID=self.generateID()
		HTTP.setCookie(self.env,{"name":"SESS", "value":self.sessID, "path":"/"})