1
1
mirror of https://github.com/go-gitea/gitea synced 2024-09-30 08:14:05 +00:00
gitea/routers/web/repo
KN4CK3R 1fbdf96c34
Fix CSV render error (#17406) (#17431)
Backport #17406.

Closes #17378 

Both errors from #17378 were caused by  #15175.

Problem 1 (error with added file):
`ToUTF8WithFallbackReader` creates a `MultiReader` from a `byte[2048]` and the remaining reader. `CreateReaderAndGuessDelimiter` tries to read 10000 bytes from this reader but only gets 2048 because that's the first reader in the `MultiReader`. Then the `if size < 1e4` thinks the input is at EOF and just returns that.

Problem 2 (error with changed file):
The blob reader gets defer closed. That was fine because the old version reads the whole file into memory. Now with the streaming version the close needs to defer after the method.

Co-authored-by: zeripath <art27@cantab.net>
2021-10-25 18:31:15 +01:00
..
activity.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
attachment.go Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
blame.go Link to previous blames in file blame page (#16259) 2021-06-28 01:13:20 +02:00
branch.go Fix branch pagination error (#16805) (#16816) 2021-08-25 11:11:54 +01:00
commit.go Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895) 2021-08-31 05:02:27 +02:00
compare.go Fix CSV render error (#17406) (#17431) 2021-10-25 18:31:15 +01:00
download.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
editor_test.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
editor.go Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
http_test.go Fix http path bug (#16117) 2021-06-09 14:53:12 +02:00
http.go Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
issue_dependency.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
issue_label_test.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
issue_label.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
issue_lock.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
issue_stopwatch.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
issue_test.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
issue_timetrack.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
issue_watch.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
issue.go Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900) 2021-08-31 16:06:01 +08:00
lfs.go Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
main_test.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
middlewares.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
migrate.go Add push to remote mirror repository (#15157) 2021-06-14 19:20:43 +02:00
milestone.go In Render tolerate not being passed a context (#16842) (#16858) 2021-08-29 15:25:45 +01:00
projects_test.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
projects.go In Render tolerate not being passed a context (#16842) (#16858) 2021-08-29 15:25:45 +01:00
pull_review.go Add attachments for PR reviews (#16075) 2021-06-14 21:12:33 -04:00
pull.go Fix stange behavior of DownloadPullDiffOrPatch in incorect index (#17223) (#17227) 2021-10-05 20:16:22 +02:00
release_test.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
release.go In Render tolerate not being passed a context (#16842) (#16858) 2021-08-29 15:25:45 +01:00
repo.go Rework repository archive (#14723) 2021-06-23 17:12:38 -04:00
search.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
setting_protected_branch.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
setting.go Decrement Fork Num when converting from Fork (#17035) (#17046) 2021-09-15 10:05:47 +08:00
settings_test.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
tag.go Add tag protection (#15629) 2021-06-25 16:28:55 +02:00
topic.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
view.go Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
webhook.go Implemented head_commit for webhooks (#16282) 2021-06-29 15:34:03 +02:00
wiki_test.go Add TestPrepareWikiFileName (#16487) (#16498) 2021-07-21 03:37:00 +01:00
wiki.go Ensure wiki repos are all closed (#16886) (#16888) 2021-08-30 23:00:45 +02:00