From e4c0262dc196a27dee8feecdf3db898b426ff6fd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 22 Oct 2020 15:39:59 +0200 Subject: [PATCH] [HttpClient] never trace content of event-stream responses --- src/Symfony/Component/HttpClient/EventSourceHttpClient.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/HttpClient/EventSourceHttpClient.php b/src/Symfony/Component/HttpClient/EventSourceHttpClient.php index 5dfa929c54618..d6f27a7fae99f 100644 --- a/src/Symfony/Component/HttpClient/EventSourceHttpClient.php +++ b/src/Symfony/Component/HttpClient/EventSourceHttpClient.php @@ -60,6 +60,10 @@ public function request(string $method, string $url, array $options = []): Respo if ($accept = self::normalizeHeaders($options['headers'] ?? [])['accept'] ?? []) { $state->buffer = \in_array($accept, [['Accept: text/event-stream'], ['accept: text/event-stream']], true) ? '' : null; + + if (null !== $state->buffer) { + $options['extra']['trace_content'] = false; + } } return new AsyncResponse($this->client, $method, $url, $options, static function (ChunkInterface $chunk, AsyncContext $context) use ($state, $method, $url, $options) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy