mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
Fix duplicate keys causing an exception
This commit is contained in:
@@ -29,5 +29,25 @@ namespace Jellyfin.Api.Controllers
|
||||
StatusCode = 200
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests the url decoding.
|
||||
/// </summary>
|
||||
/// <param name="params">Parameters to echo back in the response.</param>
|
||||
/// <returns>An <see cref="OkResult"/>.</returns>
|
||||
/// <response code="200">Information retrieved.</response>
|
||||
[HttpGet("UrlArrayDecode")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
public ContentResult TestUrlArrayDecoding([FromQuery] Dictionary<string, string[]>? @params = null)
|
||||
{
|
||||
return new ContentResult()
|
||||
{
|
||||
Content = (@params != null && @params.Count > 0)
|
||||
? string.Join("&", @params.Select(x => x.Key + "=" + string.Join(',', x.Value)))
|
||||
: string.Empty,
|
||||
ContentType = "text/plain; charset=utf-8",
|
||||
StatusCode = 200
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user