Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

16 righe
306 B

  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)