Skip to content

Commit

Permalink
filter out 'none' compression
Browse files Browse the repository at this point in the history
  • Loading branch information
brettmc committed Jan 13, 2025
1 parent 540243e commit b7b9ca1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SDK/Common/Export/Http/PsrUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static function decode(string $value, array $encodings): string
public static function compression($compression): array
{
if (is_array($compression)) {
return $compression;
return array_filter($compression, fn($value): bool => $value !== 'none');
}
if ($compression === 'none' || !$compression) {
return [];
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/SDK/Common/Export/Http/PsrUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public static function compressionProvider(): array
['gzip,br', ['gzip','br']],
['gzip , brotli', ['gzip','brotli']],
[['gzip'], ['gzip']],
[['gzip', 'none'], ['gzip']],
];
}
}

0 comments on commit b7b9ca1

Please sign in to comment.