File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 77
77
"source" : {
78
78
"url" : " https://github.com/httpwg/structured-field-tests.git" ,
79
79
"type" : " git" ,
80
- "reference" : " mnot/display-string "
80
+ "reference" : " main "
81
81
}
82
82
}
83
83
}
Original file line number Diff line number Diff line change @@ -80,19 +80,20 @@ public function decoded(): string
80
80
public function encoded (): string
81
81
{
82
82
$ value = $ this ->value ;
83
+
83
84
$ encodeMatches = static fn (array $ matches ): string => match (1 ) {
84
- preg_match ('/[^A-Za-z\d_\-.~]/ ' , rawurldecode ($ matches [0 ])) => rawurlencode ($ matches [0 ]),
85
+ preg_match ('/[^A-Za-z\d_\-.~]/ ' , rawurldecode ($ matches [0 ])) => strtolower ( rawurlencode ($ matches [0 ]) ),
85
86
default => $ matches [0 ],
86
87
};
87
88
88
- return strtolower ( match (true ) {
89
+ return match (true ) {
89
90
'' === $ value => $ value ,
90
91
default => (string ) preg_replace_callback (
91
92
'/[^A-Za-z\d_\-.~\!\$& \'\(\)\*\+,;\=% \\\\:@\/? ]+|%(?![A-Fa-f\d]{2})/ ' ,
92
93
$ encodeMatches (...),
93
94
$ value
94
95
),
95
- }) ;
96
+ };
96
97
}
97
98
98
99
public function equals (mixed $ other ): bool
You can’t perform that action at this time.
0 commit comments