Issue #10711: Remove HTTP 0.9 support from http.client.  The `strict`
parameter to HTTPConnection and friends is deprecated.
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index fe557ff..3003331 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -139,8 +139,10 @@
 
     def fakehttp(self, fakedata):
         class FakeSocket(io.BytesIO):
+            io_refs = 1
             def sendall(self, str): pass
             def makefile(self, *args, **kwds):
+                self.io_refs += 1
                 return self
             def read(self, amt=None):
                 if self.closed: return b""
@@ -148,6 +150,10 @@
             def readline(self, length=None):
                 if self.closed: return b""
                 return io.BytesIO.readline(self, length)
+            def close(self):
+                self.io_refs -= 1
+                if self.io_refs == 0:
+                    io.BytesIO.close(self)
         class FakeHTTPConnection(http.client.HTTPConnection):
             def connect(self):
                 self.sock = FakeSocket(fakedata)
@@ -157,8 +163,8 @@
     def unfakehttp(self):
         http.client.HTTPConnection = self._connection_class
 
-    def test_read(self):
-        self.fakehttp(b"Hello!")
+    def check_read(self, ver):
+        self.fakehttp(b"HTTP/" + ver + b" 200 OK\r\n\r\nHello!")
         try:
             fp = urlopen("http://python.org/")
             self.assertEqual(fp.readline(), b"Hello!")
@@ -168,6 +174,17 @@
         finally:
             self.unfakehttp()
 
+    def test_read_0_9(self):
+        # "0.9" response accepted (but not "simple responses" without
+        # a status line)
+        self.check_read(b"0.9")
+
+    def test_read_1_0(self):
+        self.check_read(b"1.0")
+
+    def test_read_1_1(self):
+        self.check_read(b"1.1")
+
     def test_read_bogus(self):
         # urlopen() should raise IOError for many error codes.
         self.fakehttp(b'''HTTP/1.1 401 Authentication Required
@@ -191,7 +208,7 @@
             self.unfakehttp()
 
     def test_userpass_inurl(self):
-        self.fakehttp(b"Hello!")
+        self.fakehttp(b"HTTP/1.0 200 OK\r\n\r\nHello!")
         try:
             fp = urlopen("http://user:pass@python.org/")
             self.assertEqual(fp.readline(), b"Hello!")