Plain text README displayed partially #7245

Closed
opened 2025-11-02 07:20:43 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @bagasme on GitHub (Apr 25, 2021).

  • Gitea version (or commit ref): master (commit 6ea6e2b4eb, built with Go 1.16.1, Node 14.15.4).
  • Git version: 2.31.1
  • Operating system: Debian 10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (not relevant)
  • Log gist: (not relevant)

Description

I have a copy of git.git repository on my Gitea instance. When I navigate to t/ directory, the displayed README was only partial (not fully displayed). I have to click Raw to see the full contents.

This issue first occurred from commit a week ago (I forgot where it is first happened).

This issue does not occur in README files with file extension (such as README.md).

Screenshots

displayed README
In the screenshot above, the README is displayed up until Since the tes.

Originally created by @bagasme on GitHub (Apr 25, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): master (commit 6ea6e2b4eb339f58f805783532f1b481fec67375, built with Go 1.16.1, Node 14.15.4). - Git version: 2.31.1 - Operating system: Debian 10 <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No (not relevant) - Log gist: (not relevant) <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description <!-- If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services. --> I have a copy of [git.git](https://github.com/git/git) repository on my Gitea instance. When I navigate to `t/` directory, the displayed `README` was only partial (not fully displayed). I have to click `Raw` to see the full contents. This issue first occurred from commit a week ago (I forgot where it is first happened). This issue does not occur in README files with file extension (such as `README.md`). ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![displayed README](https://user-images.githubusercontent.com/40219486/115991474-c292c780-a5f2-11eb-9440-23e2d04e04a4.png) In the screenshot above, the `README` is displayed up until `Since the tes`.
GiteaMirror added the type/bug label 2025-11-02 07:20:43 -06:00
Author
Owner

@POPSuL commented on GitHub (Apr 28, 2021):

It's caused by this if-else branch https://github.com/go-gitea/gitea/blob/master/routers/repo/view.go#L514

Here only 1024 bytes passed to view (from https://github.com/go-gitea/gitea/blob/master/routers/repo/view.go#L404)

@POPSuL commented on GitHub (Apr 28, 2021): It's caused by this if-else branch https://github.com/go-gitea/gitea/blob/master/routers/repo/view.go#L514 Here only 1024 bytes passed to view (from https://github.com/go-gitea/gitea/blob/master/routers/repo/view.go#L404)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7245