File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -295,16 +295,16 @@ public static function normalize(Stringable|string $uri): string
295
295
$ path = self ::removeDotSegments ($ path );
296
296
}
297
297
298
- $ path = Encoder::decodePath ($ path );
299
- if (null !== self ::buildAuthority ($ components ) && ('' === $ path || null === $ path )) {
298
+ $ path = Encoder::encodePath (Encoder:: decodePath ($ path) );
299
+ if (null !== self ::buildAuthority ($ components ) && ('' === $ path )) {
300
300
$ path = '/ ' ;
301
301
}
302
302
303
303
$ components ['path ' ] = $ path ;
304
- $ components ['query ' ] = Encoder::decodeQuery ($ components ['query ' ]);
305
- $ components ['fragment ' ] = Encoder::decodeFragment ($ components ['fragment ' ]);
306
- $ components ['user ' ] = Encoder::decodeUnreservedCharacters ($ components ['user ' ]);
307
- $ components ['pass ' ] = Encoder::decodeUnreservedCharacters ($ components ['pass ' ]);
304
+ $ components ['query ' ] = Encoder::encodeQueryOrFragment (Encoder:: decodeQuery ($ components ['query ' ]) );
305
+ $ components ['fragment ' ] = Encoder::encodeQueryOrFragment (Encoder:: decodeFragment ($ components ['fragment ' ]) );
306
+ $ components ['user ' ] = Encoder::encodeUser (Encoder:: decodeUnreservedCharacters ($ components ['user ' ]) );
307
+ $ components ['pass ' ] = Encoder::encodePassword (Encoder:: decodeUnreservedCharacters ($ components ['pass ' ]) );
308
308
309
309
return self ::build ($ components );
310
310
}
You can’t perform that action at this time.
0 commit comments