I have a web api that uses .Net 4.7.1 and I noticed some strange behavior when performing a get on one of the endpoints. When I perform a get to the endpoint http://localhost:52684/api/v1/some-resource?client_timezone=%2B0500 the parameter client timezone is received as " 0500" rather than "+0500". the only thing I can think of is that the Url is being decoded twice so the "%2B" turns into "+" and then " ". Does anyone know of any common causes of this or why it might be happening?
Here's a similar endpoint on the controller
[HttpGet]
[Authorize]
[ApiRoute("some-resource", StartingVersion = 1)]
[EnableCors("*", "*", "GET", "*")]
public IHttpActionResult SomeResource([FromUri] string timezone)
{
if (!DataValidationUtililties.IsValidClientTimezone(timezone))
{
return BadRequest();
}
return Ok();
}