- Gitea version (or commit ref): 1.14.0
- Git version: git version 2.30.2
- Operating system: alpine-release 3.13.5
- Database (use
[x]):
- Can you reproduce the bug at https://try.gitea.io:
Description
Steps to reproduce:
- add the first PDF file from the attachments to a repository, and name the file e.g.
test.pdf.
- commit & push.
- in the web UI, navigate to the repository and display the PDF file in the repository. The PDF is nicely displayed.
- simulate some changes in the PDF by replacing the existing PDF with the second ond from the attachment. Git marks the PDF file as changed, because there are differences.
- commit & push.
- in the web UI, navigate to the repository and display the PDF. Expected behaviour: the replaced PDF should be shown (with the changes). Actual behaviour: the browser still loads the old version of the PDF, without the changes.
- in the web UI, navigate to the PDF, and select the
Raw download. The browser downloads the wrong PDF file with the old contents.
- in the web UI, choose "Download Repository". In the downloaded ZIP or TAR file, the correct PDF is included.
Obviously, Gitea (or the web browser) performs some internal caching which leads to the fact that PDF files are not properly updated when they have been changed. Even refreshing the page in the browser does not solve the issue. It can only resolved by using a browser on a different computer, using an "incognito" tab or completely clearing the browser cache. While it is not strictly necessary to have PDF files in Git, it still indicates some problems with caching and the question arises: could this behaviour also affect other files, e.g. plain text files, or source code files or images?
test.pdf
test.pdf
[x]):Description
Steps to reproduce:
test.pdf.Rawdownload. The browser downloads the wrong PDF file with the old contents.Obviously, Gitea (or the web browser) performs some internal caching which leads to the fact that PDF files are not properly updated when they have been changed. Even refreshing the page in the browser does not solve the issue. It can only resolved by using a browser on a different computer, using an "incognito" tab or completely clearing the browser cache. While it is not strictly necessary to have PDF files in Git, it still indicates some problems with caching and the question arises: could this behaviour also affect other files, e.g. plain text files, or source code files or images?
test.pdf
test.pdf