Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The repeated case is something I hadn't thought of when I wrote the original comment since I would never do that so this got me curious. Looks like it _isn't_ guaranteed by any spec, and different frameworks have their own rules as you pointed out. For example, PHP will take the last duplicate param value as the "winner", and others group them into an array.

While I think this would be a bad application design, it looks like swapping the order of params could result in errors in some cases. In practice though I would treat the URLs the same.



You would never do that, I wouldn't either, but in machine-to-machine API interactions, this tends to crop up - i.e. a SW stack where this implies "an array of `a` values and a scalar `b` value" sends the data to a SW stack where "last `a` wins, last `b` wins", and strange bugs ensue, as both sides insist they're doing The Right Thing :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: