Index: tests/http/base.php
===================================================================
--- tests/http/base.php	(revision 1219)
+++ tests/http/base.php	(working copy)
@@ -128,6 +128,29 @@
 	}
 
 	/**
+	 * @ticket 17588
+	 */
+	function test_redirections_method() {
+		$methods = array(
+			301 => 'POST',
+			307 => 'POST',
+			302 => 'GET',
+			303 => 'GET',
+		);
+
+		foreach ( $methods as $code => $expected_method ) {
+			$url = add_query_arg( array(
+				'method-check' => 'true',
+				'code' => $code,
+				'rt' => 2,
+			), $this->redirection_script );
+
+			$res = wp_remote_request( $url, array( 'method' => 'POST' ) );
+			$this->assertEquals( $expected_method, wp_remote_retrieve_header( $res, 'requestmethod' ), 'With code: ' . $code );
+		}
+	}
+
+	/**
 	 * Do not redirect on non 3xx status codes
 	 *
 	 * @ticket 16889
Index: data/WPHTTP-testcase-redirection-script.php
===================================================================
--- data/WPHTTP-testcase-redirection-script.php	(revision 1248)
+++ data/WPHTTP-testcase-redirection-script.php	(working copy)
@@ -51,17 +51,26 @@
 	exit;
 }
 
+if ( isset( $_GET['method-check'] ) )
+	header( "requestmethod: " . $_SERVER['REQUEST_METHOD'] );
+
 $rt = isset($_GET['rt']) ? $_GET['rt'] : 5;
 $r = isset($_GET['r']) ? $_GET['r'] : 0;
 
-/*if ( $r === 0 ) {
-	header("Location: http://tools.dd32.id.au/redirect/?r=1" );
-	exit;
-}*/
-
 if ( $r < $rt ) {
 	$code = isset($_GET['code']) ? (int)$_GET['code'] : 302;
-	header("Location: $url?rt=" . $rt . "&r=" . ($r+1), true, $code);
+
+	$args = array(
+		'code' => $code,
+		'rt' => $rt,
+		'r' => $r+1,
+	);
+
+	if ( isset( $_GET['method-check'] ) )
+		$args['method-check'] = 'true';
+
+	$url = $url . '?' . http_build_query( $args );
+	header( "Location: $url", true, $code );
 	echo "Redirect $r of $rt";
 	exit;
 }
