gitea/modules
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
..
analyze
auth
avatar
base
cache
charset Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
context
convert
cron
csv Fix CSV render error (#17406) (#17431) 2021-10-25 18:31:15 +01:00
doctor
emoji
eventsource
generate
git Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
gitgraph
graceful
hcaptcha
highlight
httpcache
httplib
indexer
lfs
log
markup
matchlist
metrics
migrations
nosql
notification
options
password
pprof
private
process
public
queue
recaptcha
references
repofiles Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
repository
secret
session
setting
ssh
storage
structs
svg
sync
task
templates
test
timeutil
translation
typesniffer Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
upload
uri
user
util Read expected buffer size (#17409) (#17430) 2021-10-25 17:46:56 +01:00
validation
web