API returns HTTP 404 when url contains encoded project path

Summary

Gitlab API returns HTTP 404 error if URL contains encoded project path instead of project ID

Steps to reproduce

For project located in for example: mobile/ios/someapp below request returns HTTP 404:

curl --header "PRIVATE-TOKEN: <TOKEN>" https://gitlab.com/api/v4/projects/mobile%2Fios%2Fsomeapp/merge_requests/<MERGEREQUESTID>

But if the request contains project ID instead of mobile%2Fios%2Fsomeapp it works as expected

curl --header "PRIVATE-TOKEN: <TOKEN>" https://gitlab.com/api/v4/projects/<PROJECTID>/merge_requests/<MERGEREQUESTID>

What is the current bug behavior?

API returns HTTP 404 error

What is the expected correct behavior?

API should return correct response to the request

Output of checks

This bug happens on GitLab.com