/opt/cpanel/ea-wappspector/vendor/guzzlehttp/psr7/src
NameSizeModeActions
Exception/-0755rm
AppendStream.php76060644editdlrm
BufferStream.php48040644editdlrm
CachingStream.php69010644editdlrm
DroppingStream.php15140644editdlrm
FnStream.php58980644editdlrm
Header.php50930644editdlrm
HttpFactory.php30750644editdlrm
InflateStream.php14150644editdlrm
LazyOpenStream.php10880644editdlrm
LimitStream.php52300644editdlrm
Message.php124810644editdlrm
MessageTrait.php109120644editdlrm
MimeType.php571730644editdlrm
MultipartStream.php112190644editdlrm
NoSeekStream.php11460644editdlrm
PumpStream.php70420644editdlrm
Query.php47850644editdlrm
Request.php52370644editdlrm
Response.php58800644editdlrm
Rfc3986.php4900644editdlrm
Rfc7230.php31890644editdlrm
ServerRequest.php135320644editdlrm
Stream.php89690644editdlrm
StreamDecoratorTrait.php49060644editdlrm
StreamWrapper.php47970644editdlrm
UploadedFile.php50990644editdlrm
Uri.php266610644editdlrm
UriComparator.php12780644editdlrm
UriNormalizer.php93510644editdlrm
UriResolver.php83470644editdlrm
Utils.php252870644editdlrm
Edit: /opt/cpanel/ea-wappspector/vendor/guzzlehttp/psr7/src/UriNormalizer.php (9351B)
getPath() === '' && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') ) { $uri = $uri->withPath('/'); } if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { $uri = $uri->withHost(''); } if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { $uri = $uri->withPort(null); } if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); } if ($flags & self::REMOVE_DUPLICATE_SLASHES) { $path = preg_replace('#//++#', '/', $uri->getPath()); if ($path === null) { throw new \RuntimeException('Unable to remove duplicate slashes from URI path: '.preg_last_error_msg()); } $uri = $uri->withPath($path); } if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { $queryKeyValues = explode('&', $uri->getQuery()); sort($queryKeyValues); $uri = $uri->withQuery(implode('&', $queryKeyValues)); } return $uri; } /** * Whether two URIs can be considered equivalent. * * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be * resolved against the same base URI. If this is not the case, determination of equivalence or difference of * relative references does not mean anything. * * @param UriInterface $uri1 An URI to compare * @param UriInterface $uri2 An URI to compare * @param int $normalizations A bitmask of normalizations to apply, see constants * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1 */ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool { return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); } private static function capitalizePercentEncoding(UriInterface $uri): UriInterface { $regex = '/(?:%[A-Fa-f0-9]{2})++/'; $callback = function (array $match): string { return Utils::asciiToUpper($match[0]); }; return $uri ->withPath(self::normalizePercentEncodingInComponent($uri->getPath(), $regex, $callback)) ->withQuery(self::normalizePercentEncodingInComponent($uri->getQuery(), $regex, $callback)) ->withFragment(self::normalizePercentEncodingInComponent($uri->getFragment(), $regex, $callback)); } private static function decodeUnreservedCharacters(UriInterface $uri): UriInterface { $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; $callback = function (array $match): string { return rawurldecode($match[0]); }; return $uri ->withPath(self::normalizePercentEncodingInComponent($uri->getPath(), $regex, $callback)) ->withQuery(self::normalizePercentEncodingInComponent($uri->getQuery(), $regex, $callback)) ->withFragment(self::normalizePercentEncodingInComponent($uri->getFragment(), $regex, $callback)); } /** * @param callable(array): string $callback */ private static function normalizePercentEncodingInComponent(string $component, string $regex, callable $callback): string { $normalized = preg_replace_callback($regex, $callback, $component); if ($normalized === null) { throw new \RuntimeException('Unable to normalize URI component percent-encoding: '.preg_last_error_msg()); } return $normalized; } private function __construct() { // cannot be instantiated } }