commit | deacce2c8799c3aa5adfdc4263cc5bf1e933867e | [log] [tgz] |
---|---|---|
author | Martin v. Löwis <martin@v.loewis.de> | Wed Aug 18 12:46:26 2004 +0000 |
committer | Martin v. Löwis <martin@v.loewis.de> | Wed Aug 18 12:46:26 2004 +0000 |
tree | 7e1faf8637a0f77b317b72ba28b4835d3a8fb68b | |
parent | c473c99d16b43544fffcc8a33fbc61c95061b088 [diff] [blame] |
Patch #800236: add HTTPResponse.getheaders().
diff --git a/Lib/httplib.py b/Lib/httplib.py index c0d372f..a4102ea 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py
@@ -493,6 +493,12 @@ raise ResponseNotReady() return self.msg.getheader(name, default) + def getheaders(self): + """Return list of (header, value) tuples.""" + if self.msg is None: + raise ResponseNotReady() + return self.msg.items() + class HTTPConnection: