Azure / Azure/azure-functions-host

Using %2f in custom routes returns 404 when deployed to Azure

Open
#3,998 14 comments 7 reactions 0 assignees View on GitHub
needs-investigation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

#3916 Is supposed to fix using a + character in custom routes.

This problem still exists in version 2.0.12275.0 of the runtime host when using the "/" character, escaped to %2f.

For instance, I have a function that returns a message specified in the route.
Locally calling `http://localhost:7071/api/Echo/my%2fmessage` works fine. When deployed to Azure `http://hannesechocsv2.azurewebsites.net/api/Echo/my%2fmessage` returns a 404.

The code I've deployed is available in https://github.com/hannesne/EchoFunction/tree/RoutingSample/CSharp/V2

This seems similar to Azure/Azure-Functions#1949

Contributor guide

Open the contributing guide

Research direction

Start with the linked EchoFunction RoutingSample/CSharp/V2 reproduction and compare the local request with the deployed Azure URL. Read the related #3916 and Azure/Azure-Functions#1949 discussions for existing context on encoded route characters. Done means that the %2f route no longer returns 404 when deployed, while the local behavior remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.