Index: Lib/xmlrpc/client.py =================================================================== --- Lib/xmlrpc/client.py (revision 64003) +++ Lib/xmlrpc/client.py (working copy) @@ -1127,7 +1127,7 @@ raise ProtocolError( host + handler, resp.status, resp.reason, - dict(resp.getheaders()) + dict(resp.get_headers()) ) self.verbose = verbose Index: Lib/http/client.py =================================================================== --- Lib/http/client.py (revision 64003) +++ Lib/http/client.py (working copy) @@ -641,12 +641,12 @@ amt -= len(chunk) return b"".join(s) - def getheader(self, name, default=None): + def get_header(self, name, default=None): if self.msg is None: raise ResponseNotReady() - return self.msg.getheader(name, default) + return self.msg.get(name, default) - def getheaders(self): + def get_headers(self): """Return list of (header, value) tuples.""" if self.msg is None: raise ResponseNotReady() Index: Lib/test/test_docxmlrpc.py =================================================================== --- Lib/test/test_docxmlrpc.py (revision 64003) +++ Lib/test/test_docxmlrpc.py (working copy) @@ -80,7 +80,7 @@ response = self.client.getresponse() self.assertEqual(response.status, 200) - self.assertEqual(response.getheader("Content-type"), "text/html") + self.assertEqual(response.get_header("Content-type"), "text/html") # Server throws an exception if we don't start to read the data response.read() @@ -90,7 +90,7 @@ response = self.client.getresponse() self.assertEqual(response.status, 404) - self.assertEqual(response.getheader("Content-type"), "text/plain") + self.assertEqual(response.get_header("Content-type"), "text/plain") response.read() Index: Lib/test/test_httplib.py =================================================================== --- Lib/test/test_httplib.py (revision 64003) +++ Lib/test/test_httplib.py (working copy) @@ -131,7 +131,7 @@ s = FakeSocket(text) r = httplib.HTTPResponse(s) r.begin() - cookies = r.getheader("Set-Cookie") + cookies = r.get_header("Set-Cookie") self.assertEqual(cookies, hdr) def test_read_head(self): Index: Lib/test/test_httpservers.py =================================================================== --- Lib/test/test_httpservers.py (revision 64003) +++ Lib/test/test_httpservers.py (working copy) @@ -172,7 +172,7 @@ def test_return_header_keep_alive(self): self.con.request('KEEP', '/') res = self.con.getresponse() - self.assertEquals(res.getheader('Connection'), 'keep-alive') + self.assertEquals(res.get_header('Connection'), 'keep-alive') self.con.request('TEST', '/') def test_internal_key_error(self): @@ -246,9 +246,9 @@ response = self.request( self.tempdir_name + '/test', method='HEAD') self.check_status_and_reason(response, 200) - self.assertEqual(response.getheader('content-length'), + self.assertEqual(response.get_header('content-length'), str(len(self.data))) - self.assertEqual(response.getheader('content-type'), + self.assertEqual(response.get_header('content-type'), 'application/octet-stream') def test_invalid_requests(self): @@ -317,7 +317,7 @@ def test_headers_and_content(self): res = self.request('/cgi-bin/file1.py') self.assertEquals((b'Hello World\n', 'text/html', 200), \ - (res.read(), res.getheader('Content-type'), res.status)) + (res.read(), res.get_header('Content-type'), res.status)) def test_post(self): params = urllib.urlencode({'spam' : 1, 'eggs' : 'python', 'bacon' : 123456}) @@ -336,7 +336,7 @@ base64.b64encode(b'username:pass')} res = self.request('/cgi-bin/file1.py', 'GET', headers=headers) self.assertEquals((b'Hello World\n', 'text/html', 200), \ - (res.read(), res.getheader('Content-type'), res.status)) + (res.read(), res.get_header('Content-type'), res.status)) def test_main(verbose=None):