Skip to content

Images cannot be seen on branches #813

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

Closed
gitblit opened this issue Aug 12, 2015 · 8 comments
Closed

Images cannot be seen on branches #813

gitblit opened this issue Aug 12, 2015 · 8 comments
Labels
🐱 Defect Status-Duplicate This issue is a duplicate of another issue.
Milestone

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 517

What steps will reproduce the problem?
1. have a Git repo with image files
2. branch it
3. navigate to the image file in the branch

What is the expected output? What do you see instead?
For the head I can see the image shown as the content of the file.
For the branch the server just sends back this string instead of the image data:

<h1>Error</h1><p>Sorry, the requested resource <strong>/documentation/docs/images/blah.png</strong>
was not found in <strong>johndoe/documentation</strong>.</p>

What version of the product are you using? On what operating system?
1.6.1 on Win7

Reported by bpalyi on 2014-10-22 18:13:58

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Oh, and the server log is:

RawServlet Failed to load reponame 65cf9edef95f7b7a082094ab3226d4deeba08b93 reponame/johndoe!documentation/documentation!docs!images!blah.png

Reported by bpalyi on 2014-10-22 18:17:16

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Go or WAR?
Are you navigating using the "tree" links with the full UI or are you navigating the
"raw" links?

Reported by James.Moger on 2014-10-22 18:54:46

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

It's Go. And I'm navigating with the full UI, however I can see that at the end it's
the "raw" link that does not work...

Reported by bpalyi on 2014-10-22 19:00:56

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Oh, and where I detected all this was when I added an image to a Markdown file and wanted
to see it parsed: the image was not loading.

Reported by bpalyi on 2014-10-22 19:02:44

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

I can't reproduce this.  Feel like creating a small example repo and attaching?

Reported by James.Moger on 2014-10-22 19:14:46

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

I would, just have to finish up my documentation job first (currently my boss doesn't
really care about if the docs can be displayed in Gitblit, but I'd like to push the
thing ;-))

Reported by bpalyi on 2014-10-23 13:22:43

@flaix
Copy link
Member

flaix commented Dec 14, 2016

@bpalyi, any update on this?

@flaix flaix added this to the 1.9.2 milestone Nov 1, 2020
@flaix flaix self-assigned this Nov 6, 2020
@flaix
Copy link
Member

flaix commented Nov 9, 2020

The key here is that the branch name used was johndoe/documentation, which has a forward slash in it. Thus this is the problem of loading raw files from branches with a slash.
I am setting this as a duplicate of #1290, because that ticket has a better explanation in the report, unlike this one, even if this one was reported earlier.

@flaix flaix added Status-Duplicate This issue is a duplicate of another issue. and removed Priority-Medium Status-Needs Submitter Response 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.
@flaix flaix unassigned gitblit and flaix Oct 25, 2021
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

2 participants