From 1981833119e02a5edb1741253b74cb90c5d5d615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 30 Aug 2025 22:53:58 +0200 Subject: [PATCH] =?UTF-8?q?uri:=20Retrieve=20=E2=80=9Craw=E2=80=9D=20repre?= =?UTF-8?q?sentation=20for=20`->getPort()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The implementation only supports one possible representation of the port. Retrieve the raw representation to avoid unnecessarily normalizing the URI for uri_parser_rfc3986. --- ext/uri/php_uri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/uri/php_uri.c b/ext/uri/php_uri.c index 4c5a496c3eec..17278c0f422e 100644 --- a/ext/uri/php_uri.c +++ b/ext/uri/php_uri.c @@ -555,7 +555,7 @@ PHP_METHOD(Uri_Rfc3986_Uri, getRawHost) PHP_METHOD(Uri_Rfc3986_Uri, getPort) { - uri_read_component(INTERNAL_FUNCTION_PARAM_PASSTHRU, URI_PROPERTY_NAME_PORT, URI_COMPONENT_READ_NORMALIZED_ASCII); + uri_read_component(INTERNAL_FUNCTION_PARAM_PASSTHRU, URI_PROPERTY_NAME_PORT, URI_COMPONENT_READ_RAW); } PHP_METHOD(Uri_Rfc3986_Uri, getPath)