URL multiple parameters, same name


When i try to add multiple parameters (withParameter()) to the URL with the same name, i only get the last one. It’s OK to post multiple parameters with the same name (i’m doing uploads to googlecode and multiple labels for the upload have the same ‘label’ parameter name).


Is it really ok to send the same parameter multiple times?? Seems a bit bizarre…


this is how i upload a DMG build to googlecode:

curl -O -k -u $GLOGIN:$GPASSWORD -F label="OpSys-OSX" -F label="Type-Package" -F label="Featured" -F summary="$1"$PFIX -F filename="@../Bin/Temp/$1_Mac_UB"$PFIX".dmg" https://ctrlr.googlecode.com/files

and all the label parameters are accepted by google as tags. Sometimes those parameters are joined into an array on the server side and can be iterated (it’s done in php).


Well, I guess you can’t stop a URL from containing multiple entries, but it’d be a pain to change the URL class to do that, as the StringPairArray doesn’t support duplicate keys.


Jules -
Here’s another request to fix this. URLs are pretty standard stuff these days, and a known bug sitting for 2 years in an excellent framework such as yours, is not great.

There is no reason for parameters to sit in a string map; they should be an array of structs. It breaks real client code, with no easy workaround other than to fight the framework.

Thank you for creating such an amazing framework - it’s the first real fun I’ve had programming since the days of PowerPlant.
Gene Z


Here is a plug-and-chug midnight solution that seems to work :shock:

Who knows what it’s really doing :smiley: - and only tested on the Mac - but it definitely works.

I’ve attached the codez - please, please roll this in somehow.



I do appreciate you trying to be helpful by posting some code, but if it’s based on an out-of-date version of the class, re-named, and even re-formatted, then all I’d get from it would be a merge headache!

Anyway, it only took me 10 mins to just fix it my own way - let me know if it works!