diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-08-18 12:46:26 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-08-18 12:46:26 (GMT) |
commit | deacce2c8799c3aa5adfdc4263cc5bf1e933867e (patch) | |
tree | 7e1faf8637a0f77b317b72ba28b4835d3a8fb68b /Lib/httplib.py | |
parent | c473c99d16b43544fffcc8a33fbc61c95061b088 (diff) | |
download | cpython-deacce2c8799c3aa5adfdc4263cc5bf1e933867e.zip cpython-deacce2c8799c3aa5adfdc4263cc5bf1e933867e.tar.gz cpython-deacce2c8799c3aa5adfdc4263cc5bf1e933867e.tar.bz2 |
Patch #800236: add HTTPResponse.getheaders().
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ class HTTPResponse: 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: |