web/http_headers.py
changeset 8313 386b6313de28
parent 8081 e8091b415ad8
child 8695 358d8bed9626
equal deleted inserted replaced
8312:6c2119509fac 8313:386b6313de28
  1288         r = self.handler.generate(name, h)
  1288         r = self.handler.generate(name, h)
  1289         if r is not None:
  1289         if r is not None:
  1290             self._raw_headers[name] = r
  1290             self._raw_headers[name] = r
  1291         return r
  1291         return r
  1292 
  1292 
  1293     def hasHeader(self, name):
  1293     def __contains__(self, name):
  1294         """Does a header with the given name exist?"""
  1294         """Does a header with the given name exist?"""
  1295         name=name.lower()
  1295         name=name.lower()
  1296         return self._raw_headers.has_key(name)
  1296         return self._raw_headers.has_key(name)
       
  1297 
       
  1298     hasHeader = __contains__
  1297 
  1299 
  1298     def getRawHeaders(self, name, default=None):
  1300     def getRawHeaders(self, name, default=None):
  1299         """Returns a list of headers matching the given name as the raw string given."""
  1301         """Returns a list of headers matching the given name as the raw string given."""
  1300 
  1302 
  1301         name=name.lower()
  1303         name=name.lower()