Skip to content

Commit dc9945e

Browse files
Merge branch '5.4' into 6.2
* 5.4: [Validator] Add missing validator translations in Polish language [HttpClient] Fix encoding some characters in query strings [FrameworkBundle] Ignore missing directories in about command Revert "[Messenger] Respect `isRetryable` decision of the retry strategy when deciding if failed message should be re-delivered"
2 parents 0de2c27 + 0dd5c06 commit dc9945e

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

HttpClientTrait.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
540540
}
541541

542542
// https://tools.ietf.org/html/rfc3986#section-3.3
543-
$parts[$part] = preg_replace_callback("#[^-A-Za-z0-9._~!$&/'()[\]*+,;=:@\\\\^`{|}%]++#", function ($m) { return rawurlencode($m[0]); }, $parts[$part]);
543+
$parts[$part] = preg_replace_callback("#[^-A-Za-z0-9._~!$&/'()[\]*+,;=:@{}%]++#", function ($m) { return rawurlencode($m[0]); }, $parts[$part]);
544544
}
545545

546546
return [
@@ -627,11 +627,7 @@ private static function mergeQueryString(?string $queryString, array $queryArray
627627
'%3B' => ';',
628628
'%40' => '@',
629629
'%5B' => '[',
630-
'%5C' => '\\',
631630
'%5D' => ']',
632-
'%5E' => '^',
633-
'%60' => '`',
634-
'%7C' => '|',
635631
]);
636632
}
637633

Tests/HttpClientTraitTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,13 @@ public static function provideParseUrl(): iterable
174174
yield [['http:', '//example.com', null, null, null], 'http://Example.coM:80'];
175175
yield [['https:', '//xn--dj-kia8a.example.com:8000', '/', null, null], 'https://DÉjà.Example.com:8000/'];
176176
yield [[null, null, '/f%20o.o', '?a=b', '#c'], '/f o%2Eo?a=b#c'];
177+
yield [[null, null, '/custom%7C2010-01-01%2000:00:00%7C2023-06-15%2005:50:35', '?a=b', '#c'], '/custom|2010-01-01 00:00:00|2023-06-15 05:50:35?a=b#c'];
177178
yield [[null, '//a:b@foo', '/bar', null, null], '//a:b@foo/bar'];
178179
yield [[null, '//a:b@foo', '/b{}', null, null], '//a:b@foo/b{}'];
179180
yield [['http:', null, null, null, null], 'http:'];
180181
yield [['http:', null, 'bar', null, null], 'http:bar'];
181182
yield [[null, null, 'bar', '?a=1&c=c', null], 'bar?a=a&b=b', ['b' => null, 'c' => 'c', 'a' => 1]];
182-
yield [[null, null, 'bar', '?a=b+c&b=b-._~!$%26/%27()[]*%2B%2C;%3D:@%25\\^`%7B|%7D', null], 'bar?a=b+c', ['b' => 'b-._~!$&/\'()[]*+,;=:@%\\^`{|}']];
183+
yield [[null, null, 'bar', '?a=b+c&b=b-._~!$%26/%27()[]*%2B%2C;%3D:@%25%5C%5E%60%7B%7C%7D', null], 'bar?a=b+c', ['b' => 'b-._~!$&/\'()[]*+,;=:@%\\^`{|}']];
183184
yield [[null, null, 'bar', '?a=b%2B%20c', null], 'bar?a=b+c', ['a' => 'b+ c']];
184185
yield [[null, null, 'bar', '?a[b]=c', null], 'bar', ['a' => ['b' => 'c']]];
185186
yield [[null, null, 'bar', '?a[b[c]=d', null], 'bar?a[b[c]=d', []];

0 commit comments

Comments
 (0)