Index: src/wp-includes/class-http.php
===================================================================
--- src/wp-includes/class-http.php	(revision 38612)
+++ src/wp-includes/class-http.php	(working copy)
@@ -359,7 +359,7 @@
 		}
 
 		// Work around a bug in Requests when the path starts with // See https://github.com/rmccue/Requests/issues/231
-		$url = preg_replace( '!^(\w+://[^/]+)//(.*)$!i', '$1/$2', $url );
+		$url = preg_replace( '!^(\w+://[^/?]+)//(.*)$!i', '$1/$2', $url );
 
 		try {
 			$requests_response = Requests::request( $url, $headers, $data, $type, $options );
Index: tests/phpunit/tests/http/base.php
===================================================================
--- tests/phpunit/tests/http/base.php	(revision 38612)
+++ tests/phpunit/tests/http/base.php	(working copy)
@@ -389,5 +389,17 @@
 		$this->assertNotWPError( $res );
 	}
 
+	/**
+	 * @ticket 37733
+	 */
+	function test_url_with_double_slashes_query() {
+		$url = 'https://wordpress.org?url=http://example.org';
 
+		$res = wp_remote_request( $url );
+		$this->assertNotWPError( $res );
+
+		$response = $res['http_response']->get_response_object();
+		$this->assertContains( '?url=http://example.org', $response->url );
+	}
+
 }
