Issue Summary
When viewing a pull request, if the project key is in lower case in the URL, the PR is not accessible.
Steps to Reproduce
- Create a pull-request in any project and repository
- View the pull-request in your browser (works)
- Change the URL of the project-key to lowercase.
i.e: http://localhost:7990/bitbucket/projects/PROJECT_1/repos/rep_1/pull-requests/2/overview -> http://localhost:7990/bitbucket/projects/project_1/repos/rep_1/pull-requests/2/overview
Expected Results
Pull request page should open because the project key is case insensitive. Every other repository page works as expected with a lowercase project key (i.e: http://localhost:7990/bitbucket/projects/project_1/repos/rep_1/browse, notice lower-case project-key, works). Note that this issue did not occur with previous versions of Bitbucket prior to 7.x
Actual Results
Receive an error message "pull-request could not be found" with the text being the word first in the URL path, then a blank page.
Workaround
Ensure project key is upper-cased when opening a pull-request.