Req #51634 [Asn->Csd]: Can't post multiple fields with the same name

From: Date: Thu, 07 Apr 2022 09:03:26 +0000
Subject: Req #51634 [Asn->Csd]: Can't post multiple fields with the same name
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240726@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51634&edit=1

 ID:                 51634
 Updated by:         derick@php.net
 Reported by:        bart at tremby dot net
 Summary:            Can't post multiple fields with the same name
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            cURL related
 PHP Version:        7.1
 Assigned To:        derick
 Block user comment: N
 Private report:     N

 New Comment:

The fix for this bug has been committed.
If you are still experiencing this bug, try to check out latest source from https://github.com/php/php-src and re-test.
Thank you for the report, and for helping us make PHP better.

For PHP 8.2.


Previous Comments:
------------------------------------------------------------------------
[2022-04-01 16:03:56] derick@php.net

https://github.com/php/php-src/pull/8292 for
PHP 8.2.

------------------------------------------------------------------------
[2022-03-22 19:38:12] neuner at futureweb dot at

Stumbled over this problem too. Too bad that hasn't been fixed :( I don't get the API to
change their behavior, as I am not in control of it.

------------------------------------------------------------------------
[2019-12-15 14:22:57] psufan513 at aol dot com

I don't understand why having PHP comply with RFC is a feature request? Why hasn't this
BUG been fixed yet? I am also having this issue trying to implement Mailgun which requires multiple
"to" fields per recipient. Using Windows 10 / PHP 7.2.10.

------------------------------------------------------------------------
[2019-09-15 22:18:31] randallfstewart at gmail dot com

I wanted to add that the current approach (simple name-value POSTs stored as array element indexes
and array element values) fails for HTTP Multipart/Form-Data file uploads.  The RFC actually
requires that multiple file uploads from the same field all use the same name.  See section 4.3 of
RFC 7578:

"To match widely deployed implementations, multiple files MUST be sent by supplying each file
in a separate part but all with the same 'name' parameter."

I came across this while trying to use the mailgun API with multiple attachments.  The mailgun API,
in accordance with RFC 7578, requires all file uploads to use the same POST name
"attachment."  When using PHP cURL, this limits me to a single attachment.

------------------------------------------------------------------------
[2018-04-13 08:23:06] requinix@php.net

Reviving as a feature request.

I agree that the implementation should not append []s automatically and instead require the
developer to use the right name with the array key. That would allow support for languages like .NET
which use multiple key= pairs.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=51634


--
Edit this bug report at https://bugs.php.net/bug.php?id=51634&edit=1


Thread (12 messages)

« previous php.bugs (#240726) next »