Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.8.1
Description
We use branch names of the form:
<product>/<version>
This works fine in git, and up until now every place in Stash I've tried. There does appear to be a problem when switching branches in the file viewer:
If I view the version of a file on the master branch and then switch to the proj/1-0-0 branch I get a "Something went wrong while trying to serve your request. Try reloading the page.". Reloading the page works and correctly shows the head version on the proj/1-0-0 branch.
Some notes:
I ran a live http request viewer and I noticed that clicking the branch name in the selector produces the following REST query:
http://<OUR SERVER>/rest/api/latest/projects/PROJ/repos/utils/commits/proj%2F1-0-0?path=modules&avatarSize=32
I'd imagine the %2F is the problem here as I don't think the branch name should be url encoded in the REST query body (that should just be a "/").
Doing a reload means its a new page query with the url:
http://<OUR SERVER>/projects/PROJ/repos/utils/browse/modules?at=refs%2Fheads%2Fproj%2F1-0-0
In this case the branch is going in as a parameter value where it should be URL encoded and so the page loads fine.
This is a right pain for us and makes the file viewer far more awkward to use when moving between branches.
Attachments
Issue Links
- is related to
-
BSERV-7389 Branch selector: Error when switching between branches with File and Folder having the same name
- Closed
-
BSERV-9097 'Unexpected Error occurred' in source view when switching branches from a branch without a file to a branch with a file
- Closed