You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

py27compat.py 306 B

123456789101112131415
  1. """
  2. Compatibility Support for Python 2.7 and earlier
  3. """
  4. import sys
  5. def get_all_headers(message, key):
  6. """
  7. Given an HTTPMessage, return all headers matching a given key.
  8. """
  9. return message.get_all(key)
  10. if sys.version_info < (3,):
  11. def get_all_headers(message, key):
  12. return message.getheaders(key)