Skip to content

Commit

Permalink
bug #36765 [HttpClient] fix dealing with informational response (nico…
Browse files Browse the repository at this point in the history
…las-grekas)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] fix dealing with informational response

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Skipping the test was a bad idea, the failure was legit.

Commits
-------

9068aa4 [HttpClient] fix dealing with informational response
  • Loading branch information
nicolas-grekas committed May 8, 2020
2 parents 012247d + 9068aa4 commit 8fec065
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpClient/Response/AmpResponse.php
Expand Up @@ -200,7 +200,7 @@ private static function generateResponse(Request $request, AmpClientState $multi

$options = null;

$activity[$id] = [new FirstChunk()];
$activity[$id][] = new FirstChunk();

if ('HEAD' === $response->getRequest()->getMethod() || \in_array($info['http_code'], [204, 304], true)) {
$activity[$id][] = null;
Expand Down
9 changes: 0 additions & 9 deletions src/Symfony/Component/HttpClient/Tests/AmpHttpClientTest.php
Expand Up @@ -25,13 +25,4 @@ public function testProxy()
{
$this->markTestSkipped('A real proxy server would be needed.');
}

public function testInformationalResponseStream()
{
if (getenv('TRAVIS_PULL_REQUEST')) {
$this->markTestIncomplete('This test always fails on Travis.');
}

parent::testInformationalResponseStream();
}
}

0 comments on commit 8fec065

Please sign in to comment.