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