Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122168 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 60601 invoked from network); 17 Jan 2024 12:55:32 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jan 2024 12:55:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1705496172; bh=YWlVtHFPiGShWK+iIHQeKMhRHdhYfUW7nmAzvK58K/A=; h=References:In-Reply-To:From:Date:Subject:To:From; b=mdGfLTUAsR4jo9dIu3kJ7Yy0ulHAkY5lCySH7brcbu8psJG3iEBWUvzMypn57P4u/ 9rkYK4UwvNPHYEprdKR7Ssd5tBsF91TPckmLlvLwT5XYYp23IdOZv9u53+N4uzAqwg 7V8eh8Tw4c+DMULN/eujOewwHOdm82LxU3ZTgdKgBYq6qrNv+gGZZuaXIWyWZbh44s mRHcwXAtJIMgaPDtCb+k/0C9IChi5C3mMfQh1QHy/AbhzIKudkjT98E8dwOqtKxVPv +rEbm/A4nM6hIjjs8/fYCrF9paG/XAiqmXrF6WyO8SHdtwgIFy+5hvQUrX/68extwH Ear7gPCUdmzHw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4C46D18004F for ; Wed, 17 Jan 2024 04:56:11 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, 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-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (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 ; Wed, 17 Jan 2024 04:56:10 -0800 (PST) Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-7831ed13d39so878946885a.0 for ; Wed, 17 Jan 2024 04:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705496130; x=1706100930; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YWlVtHFPiGShWK+iIHQeKMhRHdhYfUW7nmAzvK58K/A=; b=XxaQxq4Y9Q722TOplEKn2PsX6wvbits6qLAabJKL+o1n0XAvDVDa6+YJinm/rDwnIS YCKOCD5iayG/067x27alnkn82vXuWJuNWwJuc6XwbcUJ8soRrAvIEu1WpvYGGlTAuXOG 8PUgRxHCHmXjbvP8jS+JLV7eGd8sJOKwc5s4wWIYUoIvT1p3e4LXE3FiQwwyPJ01oPuC La+O1HV9lXG5aezFNeaaOQOOhPWpgjn2x0d4GBfK3CnStj6Ttuhzvds4k7K8p0/dE34a d5UhedKDBCLS9Y4B9eW6/+TP1WMKMarYwZWMvX44gGhWWPe9c6j1zYWVGWX4CBzKwMyC qzCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705496130; x=1706100930; h=content-transfer-encoding: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=YWlVtHFPiGShWK+iIHQeKMhRHdhYfUW7nmAzvK58K/A=; b=mQXO6qR1d/x7Od/aQIaperkIf+6RVDxV7Ppyq+L5qXEe//ZCkr/NOE2GtwMElV0ZX3 zpS/n4+aItUDhivJB0Tk6EHC5n6y+cIzde/qn+mKoEG6BA/fv8cuof2PY8qwvhNMMVP/ U43RKrRpQXJvNmrRpytp53bo+pk9qjQjKmt1QOfmC8aw20mftRV1OJ/Mrul8Xbpl0x81 eYLZLgRS0ub/RISA327voQh9VZ2Ke9AfdZnpXW5n9GksQ7Jrpr7seLS0duytnO3Zmnq5 E/c/N3u4kU0o6QLVl8k7RPLxlK6elWJuTt7krvhdRb84BIpUXJhFvh9cbLtCf7ER5DVA dHkg== X-Gm-Message-State: AOJu0Yy8hL46412WOVs52U5Rqu7yCAuqaGOAm+lqMMUHpX/m9hY8Ca/y bwSKVAJMWUtJpIzidfpzIC4n+/Iy0lPPZiTLLgk4p4/h77qOmQ== X-Google-Smtp-Source: AGHT+IHDvtBodkNq0MpopBKwr1MT7tY+6nQxdzUj0zMMZycHg4xreKCDb8KPM8b2C8vx/4/fC0ji3w+OfU5ayxvQBz4= X-Received: by 2002:a0c:dc0d:0:b0:67f:2afe:508f with SMTP id s13-20020a0cdc0d000000b0067f2afe508fmr1557426qvk.12.1705496130368; Wed, 17 Jan 2024 04:55:30 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 17 Jan 2024 13:55:19 +0100 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [RFC][Under discussion] RFC1867 for non-POST HTTP verbs From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Joan Sorry for the late response. On Thu, Dec 14, 2023 at 6:08=E2=80=AFPM Joanhey wro= te: > > We can't use sapi_module.read_post() from CLI. > > https://github.com/joanhey/AdapterMan > This runtime use the CLI-SAPI, but this SAPI is very limited. We can use > parse_str() easily for 'application/x-www-form-urlencoded' but we need > to replicate in userland for 'multipart/form-data'. > https://github.com/joanhey/AdapterMan/blob/master/src/Http.php#L410-L416 > https://github.com/joanhey/AdapterMan/blob/master/src/ParseMultipart.php Yes, a web server written in PHP is indeed the one use-case for the $input_stream parameter. Looking at AdapterMan, it looks like you're handling requests as strings. https://github.com/joanhey/AdapterMan/blob/4171d0218a253b2b4c178af= 067bd4601dd4daf80/src/ParseMultipart.php#L23 It doesn't seem like this would scale well for multipart requests. Do you reckon this can be rewritten to use streams instead? Otherwise the feature seems half-baked. I'm going forward with the RFC as is. I'm not against re-adding support for $input_stream at a later point in time. But it should be demonstrated that AdapterMan can actually make good use of it. Ilija