Merge branch '4.3' into 4.4

* 4.3:
  [HttpClient] expose only gzip when doing transparent compression
  add species to inflector and inflector tests
This commit is contained in:
Nicolas Grekas 2019-11-06 13:02:32 +01:00
commit dac61d0667
3 changed files with 5 additions and 2 deletions

View File

@ -232,8 +232,8 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface
$curlopts[CURLOPT_NOSIGNAL] = true;
}
if (!isset($options['normalized_headers']['accept-encoding'])) {
$curlopts[CURLOPT_ENCODING] = ''; // Enable HTTP compression
if (!isset($options['normalized_headers']['accept-encoding']) && CURL_VERSION_LIBZ & self::$curlVersion['features']) {
$curlopts[CURLOPT_ENCODING] = 'gzip'; // Expose only one encoding, some servers mess up when more are provided
}
foreach ($options['headers'] as $header) {

View File

@ -318,6 +318,7 @@ final class Inflector
'esoom',
'seires',
'peehs',
'seiceps',
];
/**

View File

@ -134,6 +134,7 @@ class InflectorTest extends TestCase
['services', 'service'],
['sheriffs', 'sheriff'],
['shoes', ['sho', 'shoe']],
['species', 'species'],
['spies', 'spy'],
['staves', ['staf', 'stave', 'staff']],
['stories', 'story'],
@ -268,6 +269,7 @@ class InflectorTest extends TestCase
['service', 'services'],
['sheriff', 'sheriffs'],
['shoe', 'shoes'],
['species', 'species'],
['spy', 'spies'],
['staff', 'staves'],
['story', 'stories'],