Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127070 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 D98621A00BC for ; Mon, 7 Apr 2025 23:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1744068304; bh=So0EbmSrBGfe0RH84i0YLDUNN224JW3ESkH8pZFgJTM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=H8tuWI4YcubRmIHTBRuZLAM5/Xy1weggxy/Elu7N7NGbkJL6VieyGXx27wPL08V0E ccFgNG1gPNhxJR2J+K5IIPg3EOMVnysmMWNvFazT2NUlaab/erYsVdP6iW54QouOHA V6GjBJyqZieG/yRQr8vBIhbaur176gs1UzPf8v98f04yo2LiLIABxeU3KxIRyEkfWo y+UkB5bucBlSnNxlTjcWtyXBCe4/KMvPkQBsoZTg+3Cy3Ayw29JA+RwL4XFXjgGb0S rF8X10ECv3VkhI25vD76bEOZHqRy+R64zNZyNKs60tmod+N2GthPDVD8KjLM21AQCH MYCyoI0waYFBg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 21DA018006B for ; Mon, 7 Apr 2025 23:25:04 +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=0.9 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (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, 7 Apr 2025 23:24:53 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-7c542ffec37so446707385a.2 for ; Mon, 07 Apr 2025 16:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744068438; x=1744673238; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=So0EbmSrBGfe0RH84i0YLDUNN224JW3ESkH8pZFgJTM=; b=cpyPcCUIFZEWr6v3OhnDEGC6VdjDiC2qN+BvL7hOe+Ho+HK+oV8yebVHPGGptpe1b8 6KPVGfA3y9/RRDUjPlww8H0VI/xFp/cqsWZMFXDiOSVZPvl/huvkuzBXS1PKIjbmLTDt 1V87b8DadwNHTO8SwUSbQ56/6YdhuiQAUASuRnGkAgoURD0X2YNQQQENwOv/GojOVBd/ Lk+uwfpe1ngNV9zGQQ+TezMuOUSoARTxZK1MnqS2/7/eJooPvTq/6qYpMtJ5OO/FYhD6 fPb8mbUhm2RYngowfolUnh1AT7y8MAIj5SBpyrijvyLvyG/iHjScvJk19WerWOTn+IZc w9nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744068438; x=1744673238; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=So0EbmSrBGfe0RH84i0YLDUNN224JW3ESkH8pZFgJTM=; b=gqORW+7Sty8peJjTv+qTuCWPJGpipfitGC885ZOlkhx4bIjbPOjY78h4ZESNItWCs/ JDcs7dSkUJwtpKTWlJpRCuUdC44Olu7nWLAUzNIXRSnnnfo4fL/58YXMhvNTgl43yER3 TtJPiWjFbINGI2D7km932/Hx26s48Z3fwXM/msXr1q3qAIZ70tQBGj2r7C2zUtxsrqDk xSUEmRj0IRs19467I+LQQgbXyV3RhEmjg5g5sSFE8ZGdJQX2NcjyfkBHG4rO7+awQ6Uu DRBZW0iU5KUFARvlLN8snZtlsBLMV0Oz9eMz2HFtzY0C0/rpnM1Ek6SMr31RQ7c+6HMw RSaA== X-Gm-Message-State: AOJu0YyKrszfTWwIYjSkAO7vKMnHB1LHUesPciafleyWNzr2mg1Zy+Wc YLHZgDn0v4BcXDDDQEs8b8o/dJBAab70+dFa4/QF227Cn47U3NvCs66Rp+CMslewxGLqBFa+XAj vg2xBugP9OVDg4wAWIwVBT/y7W8g= X-Gm-Gg: ASbGncuJugGfCF3zL6F0Njf1HD6f7UFGzgGGxsouaR5RkTVAzetRc3IvzIEmjqyFg+D +xW2SFSQx6H1SoROTshfuaBSfdqqHIPjPariaNmu9mfXMBS2ozjWwmx/eDrJI7km/Eew+cuSWae t0NvHU2G9+YcdZjRymc/4Jp5ey X-Google-Smtp-Source: AGHT+IHM/0T8owQrXwNdAAoADpA0DZbT3ZVDvQQjeVFcoBbYzh7T2KZNy98u5h7o0VSlSiYkZX69te2JWt3lStxfnFk= X-Received: by 2002:a05:620a:2484:b0:7c5:4014:c8a with SMTP id af79cd13be357-7c77ddce67emr1443822385a.45.1744068437746; Mon, 07 Apr 2025 16:27:17 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <8b7044d1-fde1-4701-a914-a63c8ca67099@app.fastmail.com> In-Reply-To: Date: Tue, 8 Apr 2025 00:27:06 +0100 X-Gm-Features: ATxdqUHcRyyPDJ1sXJnWzSOhYNlIHuLrgn7QUbv4oLvQOYendaPvL4nzxNhFbtw Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: Ignace Nyamagana Butera Cc: php internals Content-Type: multipart/alternative; boundary="000000000000b228240632389354" From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000b228240632389354 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ignace, it might be brought back for future improvements. > > Yes, surely! > I have one last question regarding the URI implementations which are rais= ed by my polyfill: > > Did you also took into account the delimiters when submitting data via th= e withers ? In other words is > > ```php > $uri->withQuery('?foo=3Dbar'); > //the same as > $uri->withQuery('foo=3Dbar'); > ``` > > I know it is the case in of the WHATWG specification but I do not know if= you kept this behaviour in your implementation for the WhatWgUrl for the R= fc3986 or for both. I would lean toward not accepting this "normalization" = but since this is not documented in the RFC I wanted to know what is the ex= pected behaviour. > > Yes, very good question! As you said, this aspect is not defined by eithe= r the RFC 3986, or the present PHP RFC... But yes, this normalization won't be accepted by the RFC implementation. I've just included this piece of information in the relevant section ( https://wiki.php.net/rfc/url_parsing_api#component_modification). Regards, M=C3=A1t=C3=A9 --000000000000b228240632389354 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ignace,

it might be brought back for future improvements.


Yes, surely!
=C2=A0
I have one las=
t question regarding the URI implementations which are raised by my polyfil=
l:

Did you also took into account the delimiters when submitting data via the =
withers ? In other words is

```php
$uri->withQuery('?foo=3Dbar');
//the same as=20
$uri->withQuery('foo=3Dbar');
```
I know it is the case in of th=
e WHATWG specification but I do not know if you kept this behaviour in your=
 implementation for the WhatWgUrl for the Rfc3986 or for both. I would lean=
 toward not accepting this "normalization" but since this is not =
documented in the RFC I wanted to know what is the expected behaviour.
Yes, very good question! As you said, this as= pect is not defined by either the RFC 3986, or the present PHP RFC... But y= es, this normalization
won't be accepted by the RFC implement= ation. I've just included this piece of information in the relevant sec= tion (https://wiki.php.net/rfc/url_parsing_api#component_modification)= .
=C2=A0
Regards,
M=C3=A1t=C3=A9
<= div>
=
--000000000000b228240632389354--