Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing content error in raw view & treeview #1234

Closed
exxdevop opened this issue May 18, 2017 · 3 comments
Closed

Missing content error in raw view & treeview #1234

exxdevop opened this issue May 18, 2017 · 3 comments
Labels
🐱 Defect Status-Duplicate This issue is a duplicate of another issue.
Milestone

Comments

@exxdevop
Copy link

Hello GitlBlit-Team,

we got a problem with the raw view of GitBlit. First things first, some details about our setup:

  • GitBlit version 1.8.0 (JAR)
  • JAVA 1.8

The service runs behind an apache 2.4 webserver with reverse proxy configuration like this:

        ProxyRequests Off
        ProxyVia Off
        ProxyPreserveHost On
        <Proxy>
              AddDefaultCharset off
              Require all granted
        </Proxy>
        ProxyPass / http://127.0.0.1:5010/
        ProxyPassReverse / http://127.0.0.1:5010/

We also set the option web.forwardSlashCharacter in the gitblit.properties to ! to prevent problems with encoded slashes.

The actual problem occures when browsing a branch (with a slash in its name) of a repository with the treeview and from there showing a specific file in raw view. The service runs into an error that the resource could not be found.

To reproduce the error, we:

  1. create a repository
  2. check out locally with git
  3. create a branch ( e.g. foo/bar-123)
  4. create a dummy file in this branch
  5. commit & push
  6. open the gitblit webpage
  7. browse to repo
  8. select branch from list
  9. change to tree view
  10. select raw link on file to switch to raw view

At this point the error occurs.

Thanks for advice and kind regards

@tjuchniewicz
Copy link

tjuchniewicz commented Jan 18, 2018

Is any workaround available?

@yuri1969
Copy link

yuri1969 commented Apr 5, 2018

This issue indirectly affects all the markdown display (think of a README.md) which links an external content (think of a bitmap image).

@flaix
Copy link
Member

flaix commented Nov 9, 2020

The branch is not just e.g. foo/bar-123, but it is essential to the problem that it is a branch with a slash in the name.
The raw display is broken for branches with a slash in the name. This is a duplicate of #1290, or the other way around, however you wanna see it. But #1290 has the better description mentioning the fact about the slash in the branch name.

@flaix flaix added Status-Duplicate This issue is a duplicate of another issue. and removed Priority-Medium labels Nov 9, 2020
flaix added a commit to flaix/gitblit that referenced this issue Nov 9, 2020
When a branch has a slash in the name, the raw servlet was not able
to find the path under that branch. This is due to the replacement of
the forward slash character for URLs. It was not taken into account
when comparing the branch name later.

This fixes gitblit-org#1290 and its duplicates gitblit-org#1234 and gitblit-org#813.
@flaix flaix closed this as completed Nov 9, 2020
flaix added a commit to flaix/gitblit that referenced this issue Nov 9, 2020
When a branch has a slash in the name, the raw servlet was not able
to find the path under that branch. This is due to the replacement of
the forward slash character for URLs. It was not taken into account
when comparing the branch name later.

This fixes gitblit-org#1290 and its duplicates gitblit-org#1234 and gitblit-org#813.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐱 Defect Status-Duplicate This issue is a duplicate of another issue.
Projects
None yet
Development

No branches or pull requests

4 participants