by throwaway062o · 2y ago · 0 comments
Example of a "correct" url
?value=A&value=B&value=C
Complete frameworks would have a method that returned the values as a list. Some like PHP required ugly work arounds where you had to name the parameter using the array syntax: value[]=A&value[]=B&value[]=C
Even if the framework supported multi-values, many preferred the shorter version: value=A,B,C and split the values in code instead
values = request.GET.getlist("value")
# values is now ["A", "B"]
We built it that way because we had seen the weird bugs that cropped up with the PHP solution, where passing ?q[]=x to a PHP application that expected ?q=x could result in an array passed to code that expected a string.Handy if anything actually supported it, because then you could plop parameters on the end of urls without looking to see if there was already a ?
I'm sure it's used somewhere, but I can only remember it being used by Yahoo Link Tracking ;_ylt=y64encodedgunk
So, people who learnt programming in 2000, until ~2010 it's quite normal to see the commas as delimiter of multiple parameters.