From: Benjamin Peterson Date: Sun, 3 May 2015 17:00:21 +0000 (-0400) Subject: update example, since python.org is HTTPS-only now (closes #24118) X-Git-Tag: v2.7.10rc1~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69af58013106a6e70b758bf4ee48b85a30d40d0c;p=thirdparty%2FPython%2Fcpython.git update example, since python.org is HTTPS-only now (closes #24118) --- diff --git a/Doc/library/httplib.rst b/Doc/library/httplib.rst index 03f4fb299d5e..45d829558e45 100644 --- a/Doc/library/httplib.rst +++ b/Doc/library/httplib.rst @@ -591,13 +591,13 @@ Examples Here is an example session that uses the ``GET`` method:: >>> import httplib - >>> conn = httplib.HTTPConnection("www.python.org") - >>> conn.request("GET", "/index.html") + >>> conn = httplib.HTTPSConnection("www.python.org") + >>> conn.request("GET", "/") >>> r1 = conn.getresponse() >>> print r1.status, r1.reason 200 OK >>> data1 = r1.read() - >>> conn.request("GET", "/parrot.spam") + >>> conn.request("GET", "/") >>> r2 = conn.getresponse() >>> print r2.status, r2.reason 404 Not Found @@ -608,8 +608,8 @@ Here is an example session that uses the ``HEAD`` method. Note that the ``HEAD`` method never returns any data. :: >>> import httplib - >>> conn = httplib.HTTPConnection("www.python.org") - >>> conn.request("HEAD","/index.html") + >>> conn = httplib.HTTPSConnection("www.python.org") + >>> conn.request("HEAD","/") >>> res = conn.getresponse() >>> print res.status, res.reason 200 OK