Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126488 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 9B8C91A00BC for ; Mon, 24 Feb 2025 09:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1740390068; bh=8BdIwS53C2mjo+Yt2F+4PI4xXq0wvGQyfB8K2UB00oY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GGD6Yy1u+MEHekTdti4euBg4P9SOhSLRyvKLTt9q9AF67lg3pTTbAD9dii8vN2BSF /pKF9auOD11nhnwuNfPW+I8o2BRrJl5KID+Gl4+VVLphyUhirmRAVzeWrEI1LXiruH DfkmZLv11Jtc6nZB1hbWUKXN42eyA11oA+U29ACx1uEW+bj3Ox424dO/Sehylgyytc KX64mD/0ESIYNqzefcyr6zCrK8Ck07kiO6LujaCTNo7INh2nfzSwmCP9lbFudnTipn kWEoYMPSN6a4Zpcjt4h8htHxd9hrN4rRJuU8YvIhHDcKrrDFXHIa5S309sIahgmaJR 6kIwPa47tNOXA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C354B18007E for ; Mon, 24 Feb 2025 09:41:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 24 Feb 2025 09:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1740390225; bh=Q8/MIcluhXZPVhG2mCVPXqtYM4WPPm3XMB/hRbTzaHU=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=fjjlRep1kXwkqIJZ9bOzIm2CuDj1LiyvuSDT0g3sgisYnkjrtX8dOBkUJEE6RT4uh aljD0+9yf1tKvBDBwIQLS95iBh5DM/7WXjJgT4aqNuGdS5+JBKkNZQrcndSMqxxkrv jXl4sHdW0G6iEJlllLVN2smOzhNzsLXqnuUfOLSKr8SwiIoh5b5MqVhk2L2kqjSHBp GIEeX/wW8SYvpLu5JdR9CDubLoyjNj7zDxIfUcfzwWUXDZi9amzJrKe5+NxKvAfbqr S13AezKzm706qXl5uBn7jOQgQKip1gDvjbVT7YvD5rrrDsHHWLnj6QyKeVwFc0anf0 qaoKMe3YJsk9w== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 24 Feb 2025 10:43:45 +0100 To: Ignace Nyamagana Butera Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API In-Reply-To: <9bf11a89-39d9-457b-b0ea-789fd07d7370@gmail.com> References: <1BCB4144-231D-45EA-A914-98EE8F0F503A@automattic.com> <8E614C9C-BA85-45D8-9A4E-A30D69981C5D@automattic.com> <9bf11a89-39d9-457b-b0ea-789fd07d7370@gmail.com> Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-02-24 10:18, schrieb Ignace Nyamagana Butera: > 5 - Can the returned array from __debugInfo be used in a "normal" > method like `toComponents` naming can be changed/improve to ease > migration from parse_url or is this left for userland library ? I would prefer not expose this functionality for the same reason that there are no raw properties provided: The user must make an explicit choice whether they are interested in the raw or in the normalized version of the individual components. It can make sense to normalize a hostname, but not the path. My usual example against normalizing the path is that SAML signs the *encoded* URI instead of the payload and changing the case in percent-encoded characters is sufficient to break the signature, e.g. `%2f` is different than `%2F` from a SAML signature perspective, requiring workarounds like this: https://github.com/SAML-Toolkits/php-saml/blob/c89d78c4aa398767cf9775d9e32d445e64213425/lib/Saml2/Utils.php#L724-L737 Best regards Tim Düsterhus