You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
3 years ago
..
activity.go Refactor routers directory (#15800) 4 years ago
attachment.go Read expected buffer size (#17409) (#17430) 3 years ago
blame.go Link to previous blames in file blame page (#16259) 4 years ago
branch.go Fix branch pagination error (#16805) (#16816) 4 years ago
commit.go Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895) 4 years ago
compare.go Fix CSV render error (#17406) (#17431) 3 years ago
download.go Refactor routers directory (#15800) 4 years ago
editor.go Read expected buffer size (#17409) (#17430) 3 years ago
editor_test.go Refactor routers directory (#15800) 4 years ago
http.go Fix various documentation, user-facing, and source comment typos (#16367) 4 years ago
http_test.go Fix http path bug (#16117) 4 years ago
issue.go Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900) 4 years ago
issue_dependency.go Refactor routers directory (#15800) 4 years ago
issue_label.go Refactor routers directory (#15800) 4 years ago
issue_label_test.go Refactor routers directory (#15800) 4 years ago
issue_lock.go Refactor routers directory (#15800) 4 years ago
issue_stopwatch.go Refactor routers directory (#15800) 4 years ago
issue_test.go Refactor routers directory (#15800) 4 years ago
issue_timetrack.go Refactor routers directory (#15800) 4 years ago
issue_watch.go Refactor routers directory (#15800) 4 years ago
lfs.go Read expected buffer size (#17409) (#17430) 3 years ago
main_test.go Refactor routers directory (#15800) 4 years ago
middlewares.go Refactor routers directory (#15800) 4 years ago
migrate.go Add push to remote mirror repository (#15157) 4 years ago
milestone.go In Render tolerate not being passed a context (#16842) (#16858) 4 years ago
projects.go In Render tolerate not being passed a context (#16842) (#16858) 4 years ago
projects_test.go Refactor routers directory (#15800) 4 years ago
pull.go Fix stange behavior of DownloadPullDiffOrPatch in incorect index (#17223) (#17227) 3 years ago
pull_review.go Add attachments for PR reviews (#16075) 4 years ago
release.go In Render tolerate not being passed a context (#16842) (#16858) 4 years ago
release_test.go Refactor routers directory (#15800) 4 years ago
repo.go Rework repository archive (#14723) 4 years ago
search.go Refactor routers directory (#15800) 4 years ago
setting.go Decrement Fork Num when converting from Fork (#17035) (#17046) 4 years ago
setting_protected_branch.go Refactor routers directory (#15800) 4 years ago
settings_test.go Refactor routers directory (#15800) 4 years ago
tag.go Add tag protection (#15629) 4 years ago
topic.go Refactor routers directory (#15800) 4 years ago
view.go Read expected buffer size (#17409) (#17430) 3 years ago
webhook.go Implemented head_commit for webhooks (#16282) 4 years ago
wiki.go Ensure wiki repos are all closed (#16886) (#16888) 4 years ago
wiki_test.go Add TestPrepareWikiFileName (#16487) (#16498) 4 years ago