1
votes

We have migrated an app to Azure Functions 2, and we have the following route setup:

"testABC/{testA}/{testB}"

in the azure function code we have:

public static HttpResponseMessage Run(HttpRequestMessage req, string testA, string testB, TraceWriter log)
{
  var res = req.CreateResponse(HttpStatusCode.OK);
  res.Content = new StringContent($"{testA} - {testB}");
  return res;
}

When I run this url: https://xxx.azurewebsites.net/testABC/74aff65f-5f46-4e28-838b-3093d18a3552/test it works

However if I add a plus sign it does not work: When I run this url: https://xxx.azurewebsites.net/testABC/74aff65f-5f46-4e28-838b-3093d18a3552/te+st It gives this error:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Adding a space instead of a plus works too. This isn't an issue with Azure Functions 1. What am I missing here?

1
By "route setup", do you mean that you are using an Azure Function Proxy? There are also route templates, although then your url would look more like ".net/api/testABC" docs.microsoft.com/en-us/azure/azure-functions/…Marie Hoeger
Hi Marie, I am not using any proxies - just the standard Route Template. Its working fine - except when there is a + in the valuetank104

1 Answers

2
votes

Update

It turns out allowDoubleEscaping="true" missing in v2 . It should have been fixed since runtime 2.0.12265, right now I see 2.0.12275 on my side.


Got same error on my side, but everything works locally so I doubt there could be some server request filter settings on Azure which restrict plus sign. Have opened an issue to track this problem.