We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 190d2d2 commit f055a71Copy full SHA for f055a71
1 file changed
src/Response.php
@@ -669,9 +669,17 @@ public function send(string $body = ''): void
669
670
$this->appendCookies();
671
672
+ $hasContentEncoding = false;
673
+ foreach ($this->headers as $name => $values) {
674
+ if (\strtolower($name) === 'content-encoding') {
675
+ $hasContentEncoding = true;
676
+ break;
677
+ }
678
679
+
680
// Compress body only if all conditions are met:
681
if (
- empty($this->headers['content-encoding']) &&
682
+ !$hasContentEncoding &&
683
!empty($this->acceptEncoding) &&
684
$this->isCompressible($this->contentType) &&
685
strlen($body) > $this->compressionMinSize
0 commit comments