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
I am facing similar issue as mentioned here - #2254
If there are 2 rest endpoints as given below: suppose both of them are POST:
api/user/{userID}/details
api/user/{userID}/{permission}
then making a rest call to 1st API is getting mapped to 2nd RPC handler which results in wrong response.
This somewhere happens in runtime/mux.go and runtime/pattern.go file.
It matches the details as permission variable.
I am facing this while migrating away from grpc-gateway v1 to v2.
Mentioning specific version of v2 - v2.11.3
Ideally the path should be matched first with fixed path params.
I see that this change was introduced to - Implement last-match-wins behaviour in mux, but that default behaviour break this case.
The text was updated successfully, but these errors were encountered:
Yes this is an intentionally breaking change from v1 to v2. The v1 behavior was not correctly following the http.proto spec. The original issue has more information, but this is working as intended.
🐛 Bug Report
I am facing similar issue as mentioned here -
#2254
If there are 2 rest endpoints as given below: suppose both of them are POST:
then making a rest call to 1st API is getting mapped to 2nd RPC handler which results in wrong response.
This somewhere happens in runtime/mux.go and runtime/pattern.go file.
It matches the
details
as permission variable.I am facing this while migrating away from grpc-gateway v1 to v2.
Mentioning specific version of v2 - v2.11.3
Ideally the path should be matched first with fixed path params.
I see that this change was introduced to - Implement last-match-wins behaviour in mux, but that default behaviour break this case.
The text was updated successfully, but these errors were encountered: