Skip to content

Commit

Permalink
Merge branch '6.4' into 7.1
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fabpot committed Dec 11, 2024
2 parents 6f84e44 + 8057c7c commit 817b619
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Tests/HttpClientTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -678,4 +678,26 @@ public function testHeadRequestWithClosureBody()
$this->assertIsArray($vars);
$this->assertSame('HEAD', $vars['REQUEST_METHOD']);
}

/**
* @testWith [301]
* [302]
* [303]
*/
public function testPostToGetRedirect(int $status)
{
$p = TestHttpServer::start(8067);

try {
$client = $this->getHttpClient(__FUNCTION__);

$response = $client->request('POST', 'http://localhost:8057/custom?status=' . $status . '&headers[]=Location%3A%20%2F');
$body = $response->toArray();
} finally {
$p->stop();
}

$this->assertSame('GET', $body['REQUEST_METHOD']);
$this->assertSame('/', $body['REQUEST_URI']);
}
}

0 comments on commit 817b619

Please sign in to comment.