Req #51634 [Com]: Can't post multiple fields with the same name

From: Date: Sun, 15 Dec 2019 14:22:57 +0000
Subject: Req #51634 [Com]: Can't post multiple fields with the same name
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224312@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 Comment by: psufan513 at aol dot com Reported by: bart at tremby dot net Summary: Can't post multiple fields with the same name Status: Open Type: Feature/Change Request Package: cURL related PHP Version: 7.1 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ [2018-04-13 08:20:01] requinix@php.net Related To: Bug #76216 ------------------------------------------------------------------------ [2018-04-13 08:19:31] requinix@php.net Related To: Bug #67585 ------------------------------------------------------------------------ [2014-04-25 08:56:48] mike@php.net Related To: Bug #66436 ------------------------------------------------------------------------ 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

« previous php.bugs (#224312) next »