Skip to content

Commit 845bf31

Browse files
Minor fixes
1 parent dee90ff commit 845bf31

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

src/Symfony/Component/HttpClient/Internal/AmpBody.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @internal
2626
*/
27-
class AmpBody implements HttpContent, ReadableStream
27+
class AmpBody implements HttpContent, ReadableStream, \IteratorAggregate
2828
{
2929
private ReadableStream $body;
3030
private array $info;
@@ -122,6 +122,11 @@ public function onClose(\Closure $onClose): void
122122
$this->body->onClose($onClose);
123123
}
124124

125+
public function getIterator(): \Traversable
126+
{
127+
return $this->body;
128+
}
129+
125130
public static function rewind(HttpContent $body): HttpContent
126131
{
127132
if (!$body instanceof self) {

src/Symfony/Component/HttpClient/Internal/AmpClientState.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ public function request(array $options, Request $request, Cancellation $cancella
7777
}
7878
}
7979

80-
$request = clone $request;
81-
8280
if ($request->hasHeader('proxy-authorization')) {
8381
$request->removeHeader('proxy-authorization');
8482
}

src/Symfony/Component/HttpClient/Internal/AmpListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function startTlsNegotiation(Request $request): void
7272

7373
public function startSendingRequest(Request $request, Stream $stream): void
7474
{
75-
$host = $stream->getRemoteAddress()->getHost();
75+
$host = $stream->getRemoteAddress()->getAddress();
7676

7777
if (str_contains($host, ':')) {
7878
$host = '['.$host.']';

src/Symfony/Component/HttpClient/Response/AmpResponse.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,5 +439,7 @@ private static function getPushedResponse(Request $request, AmpClientState $mult
439439

440440
return $response;
441441
}
442+
443+
return null;
442444
}
443445
}

0 commit comments

Comments
 (0)