Skip to content

Commit 817b619

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: [BeanstalkMessenger] Round delay to an integer to avoid deprecation warning [PropertyInfo] Fix interface handling in `PhpStanTypeHelper` [HttpClient] Test POST to GET redirects [HttpKernel] Denormalize request data using the csv format when using "#[MapQueryString]" or "#[MapRequestPayload]" (except for content data) fix: preserve and nowrap in profiler code highlighting
2 parents 6f84e44 + 8057c7c commit 817b619

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Tests/HttpClientTestCase.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,4 +678,26 @@ public function testHeadRequestWithClosureBody()
678678
$this->assertIsArray($vars);
679679
$this->assertSame('HEAD', $vars['REQUEST_METHOD']);
680680
}
681+
682+
/**
683+
* @testWith [301]
684+
* [302]
685+
* [303]
686+
*/
687+
public function testPostToGetRedirect(int $status)
688+
{
689+
$p = TestHttpServer::start(8067);
690+
691+
try {
692+
$client = $this->getHttpClient(__FUNCTION__);
693+
694+
$response = $client->request('POST', 'http://localhost:8057/custom?status=' . $status . '&headers[]=Location%3A%20%2F');
695+
$body = $response->toArray();
696+
} finally {
697+
$p->stop();
698+
}
699+
700+
$this->assertSame('GET', $body['REQUEST_METHOD']);
701+
$this->assertSame('/', $body['REQUEST_URI']);
702+
}
681703
}

0 commit comments

Comments
 (0)