From ea1f2d4b6e0f55263e189986ef3c3744a015852a Mon Sep 17 00:00:00 2001 From: Felipe Girotti Date: Fri, 7 Jul 2023 10:43:07 -0300 Subject: [PATCH] fix: avoid duplicate headers --- src/Context/WebApiContext.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Context/WebApiContext.php b/src/Context/WebApiContext.php index c94a429..aaaca39 100644 --- a/src/Context/WebApiContext.php +++ b/src/Context/WebApiContext.php @@ -366,6 +366,9 @@ protected function getHeaders() protected function addHeader($name, $value) { if (isset($this->headers[$name])) { + if ($this->headers[$name] === $value) { + return; + } if (!is_array($this->headers[$name])) { $this->headers[$name] = array($this->headers[$name]); }