vinod1988 / restclient-tool

Automatically exported from code.google.com/p/restclient-tool
0 stars 0 forks source link

Multiple form parameters with the same name do not get sent in a POST request. #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Do a POST to a URL with multiple copies of a parameter with the same name, 
but different values. Example:
usernames=itchy
usernames=scratchy
2. Observe in the request pane that only one of the parameters is sent, i.e. 
usernames=scratchy

What is the expected output? What do you see instead?

I would expect to see both parameters in the request body, like so:
usernames=itchy&usernames=scratchy

What version of the product are you using? On what operating system?
1.0.3 on Windows 7 32bit.

Please provide any additional information below.
Sending multiple copies of a parameter with the same name is useful for sending 
what should be interpreted as an array.

Original issue reported on code.google.com by benhiras...@gmail.com on 12 Oct 2011 at 11:02

Attachments:

GoogleCodeExporter commented 9 years ago
Looks like I didn't test specific case while focusing on implementation for 
multipart/form-data request, which allows only unique name for parameters as 
defined in RFC http://www.ietf.org/rfc/rfc2388.txt

"
3. Definition of multipart/form-data

   The media-type multipart/form-data follows the rules of all multipart
   MIME data streams as outlined in [RFC 2046].  In forms, there are a
   series of fields to be supplied by the user who fills out the form.
   Each field has a name. Within a given form, the names are unique.

   "multipart/form-data" contains a series of parts. Each part is
   expected to contain a content-disposition header [RFC 2183] where the
   disposition type is "form-data", and where the disposition contains
   an (additional) parameter of "name", where the value of that
   parameter is the original field name in the form. For example, a part
   might contain a header:

        Content-Disposition: form-data; name="user"
"

I'll include its fix on next release. Thanks for helping to make it better for 
developers like us.

Original comment by a1yadu on 13 Oct 2011 at 3:16

GoogleCodeExporter commented 9 years ago
great. thanks for making this excellent tool! looking forward to the next 
version.

Original comment by benhiras...@gmail.com on 13 Oct 2011 at 5:33