You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow multiple values for one key when adding web request parameters
Couldn't be me fixing this for FILE parameters
(ppy#6412) and then completely
failing to notice that `AddParameter()` in fact *OVERWRITES* the
previous value for a given key.
This failure is the root cause for
ppy/osu#32059. The difference between the
online version of the beatmap and the local version provided by the user
is that two `.osu` files changed filename inadvertently, because of
lazer escaping quote characters (which stable doesn't do).
In terms of patching, submission represents this as deleting the two
files from the online version of the package and then adding another
two. However, because `AddParameter()` would silently *ONLY KEEP THE
LAST FILENAME SPECIFIED* to delete, one of the `.osu` files would remain
in the patched package, and show up as a "tag mismatch" while it was
supposed to be completely gone.
---
## Breaking changes
`WebRequest.AddParameter()` multiple times with the same first parameter
(`name`) will no longer overwrite previous calls, which is to say, a
single parameter name is allowed to be associated with multiple values.
/// Add a new parameter to this request. Replaces any existing parameter with the same name.
684
+
/// Add a new parameter to this request.
685
685
/// </para>
686
686
/// <para>
687
687
/// If this request's <see cref="Method"/> supports a request body (<c>POST, PUT, DELETE, PATCH</c>), a <see cref="RequestParameterType.Form"/> parameter will be added;
@@ -701,7 +701,7 @@ public void AddParameter(string name, string value)
0 commit comments