web/request.py
changeset 8082 1c37783ff610
parent 8064 6d8eb873256d
parent 8081 e8091b415ad8
child 8128 0a927fe4541b
child 8177 e4ab883f07d9
equal deleted inserted replaced
8080:623432dc1deb 8082:1c37783ff610
   552         """remove a cookie by expiring it"""
   552         """remove a cookie by expiring it"""
   553         if bwcompat is not None:
   553         if bwcompat is not None:
   554             warn('[3.13] remove_cookie now take only a name as argument',
   554             warn('[3.13] remove_cookie now take only a name as argument',
   555                  DeprecationWarning, stacklevel=2)
   555                  DeprecationWarning, stacklevel=2)
   556             name = bwcompat
   556             name = bwcompat
   557         self.set_cookie(name, '', maxage=0, expires=date(1970, 1, 1))
   557         self.set_cookie(name, '', maxage=0,
       
   558                         # substracting GMTOFFSET because set_cookie
       
   559                         # expects a localtime and we don't want to
       
   560                         # handle times before the EPOCH
       
   561                         expires=date(1970, 1, 1) - GMTOFFSET) 
   558 
   562 
   559     def set_content_type(self, content_type, filename=None, encoding=None):
   563     def set_content_type(self, content_type, filename=None, encoding=None):
   560         """set output content type for this request. An optional filename
   564         """set output content type for this request. An optional filename
   561         may be given
   565         may be given
   562         """
   566         """