Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121302 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 23668 invoked from network); 13 Oct 2023 15:59:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Oct 2023 15:59:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 01FF5180041 for ; Fri, 13 Oct 2023 08:59:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-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,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 13 Oct 2023 08:59:17 -0700 (PDT) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-5a7c011e113so30299637b3.1 for ; Fri, 13 Oct 2023 08:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697212757; x=1697817557; 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=mIDPv6vbtQOOyBpR9CmWfelQq9mEz+WeydBPsPDmt5U=; b=ORRtT8HVxRthldJ4XvOI626b+lgIFfFUn3UMzpZe8KfUzI0C4xE0bQNKHb8ajuUeFw vLQoQK63E8gJZ8gXY1mvlyuKsZzAflimU4fk6We2Su2xKf+HTjOhPC5cXDrNtb3J5pVn +Ey5R6eUQTwkBbUwqfXfi8QbpO3Q5AzPftnKXB/cDAOFxQ75iWRgnv4BRPVpSQLLeYXO kY3OoDdbp/9ir9IXJ+pLEtmBQCFUAwkfDsi05yQylD7F5/+bRhiLA9+zuMsm1VlREsqc dyftN9FsIn++T1NbLTY0X46BUk9shZ04URCI7MedDtyJb3Bxo0Qx7+G4Yb+1FmPWJYhN ephg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697212757; x=1697817557; 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=mIDPv6vbtQOOyBpR9CmWfelQq9mEz+WeydBPsPDmt5U=; b=MjBfkMjrygw4s7LjhF2vsR5z4pu7RQc9M322mMhUTET8DnHqR+ITGzsX19HqxV3tO0 vr49RiomWOtfDYVY82KomwLic93Wk3i/WfWiF2CrD1vaVlVfyESFGJZaREs9kO8WVBnQ 3i5tOKazzkF2qf3UyKtC9bj+W7gR+EVG7zJTMfVZhpbd9R2J3RmF8AnxOSxdy/UdXpcF /t7xFYH1WXciBFXpUYMfOJRGBXc6S2Mc+vomu1k1xlqNu889x1ErOIS55LB8RN7Dt1CU +xd5u9uY+aYoLNcHDgQQSBg+6IdCooi1tq044Oaw+vunr+ZlcXsDAJCZttak/8voAXcO ztqA== X-Gm-Message-State: AOJu0Yw3qvemK0KSLY+bJJ4xmeB5jvAKOVxCm4pdNCIDLr7KpHzz0LF7 5VmA9zssVG0RLgHAL0OtVgPz+WgM4QcAA4D8x5M= X-Google-Smtp-Source: AGHT+IH/PapKQh7ufWZGX/2BiJsSd+SrZA9pFCXbBLhd4tBR8290/QI3ZneJbsMK2NGHMqKcEzdyIi0DaBAUqdDOx2Y= X-Received: by 2002:a25:dc07:0:b0:d9a:d7b6:708a with SMTP id y7-20020a25dc07000000b00d9ad7b6708amr4480472ybe.37.1697212756692; Fri, 13 Oct 2023 08:59:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 13 Oct 2023 17:59:06 +0200 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000789a7e06079b23a7" Subject: Re: [PHP-DEV] Re: [RFC][Under discussion] RFC1867 for non-POST HTTP verbs From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --000000000000789a7e06079b23a7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ilija, pt., 13 pa=C5=BA 2023, 13:15 u=C5=BCytkownik Ilija Tovilo napisa=C5=82: > Hi everyone > > On Fri, Oct 6, 2023 at 3:44=E2=80=AFPM Ilija Tovilo > wrote: > > https://wiki.php.net/rfc/rfc1867-non-post > > Thank you for the feedback so far. I made a handful of changes to the RFC= . > > * The function is renamed to request_parse_body() > * The function will now throw instead of emitting warnings when hitting > limits > * The Configuration section was added show how parsing limits may be > modified per endpoint > * The php://input is explained better in relation to multipart parsing > > Let me know if you have any more feedback. > Considering the function supports two formats multipart/form-data or the application/x-www-form-urlencodedand the fact that the return type and required arguments differ in regards to format: content-type needed for multipart which returns two arrays packed into return array aka $_POST and $_FILES and the boundary that is part of content-type header and the other format that doesn't require content-type header and returns effectively only one array aka $_POST why not having two separate functions? The proposal is to include two separate functions that have clear semantics and prevent from invoking multipart without boundary or only form with boundary: * request_parse_body($input_stream): array - returning just $_POST and maybe * request_parse_multupart_body($input_stream, string $boundary): array returning as proposed now two arrays packed $_POST and $_FILES Why the $inpit_stream accepts null - does it make sense to invoke the function then? --000000000000789a7e06079b23a7--