anchor.diff:        });
   
         if (await supportsIPv4) {
  -        expect(http.read('http://127.0.0.1:${server.port}/'),
  -            completion(equals('got request')));
  -      }
  -
  -      if (await supportsIPv6) {
  -        expect(http.read('http://[::1]:${server.port}/'),
  +        expect(http.read(Uri.http('127.0.0.1:${server.port}', '/')),
  +            completion(equals('got request')));
  +      }
  +
  +      if (await supportsIPv6) {
  +        expect(http.read(Uri.http('[::1]:${server.port}', '/')),
               throwsA(isA<SocketException>()));
         }
       });
  
positive.code:       });
  
        if (await supportsIPv4) {
          expect(http.read('http://127.0.0.1:${server.port}/'),
              completion(equals('got request')));
        }
  
        if (await supportsIPv6) {
          expect(http.read('http://[::1]:${server.port}/'),
              completion(equals('got request')));
        }
      });
  
negative.code:       });
  
        if (await supportsIPv4) {
          expect(http.read(Uri.http('127.0.0.1:${server.port}', '/')),
              completion(equals('got request')));
        }
  
        if (await supportsIPv6) {
          expect(http.read(Uri.http('[::1]:${server.port}', '/')),
              completion(equals('got request')));
        }
      });
  