gitea/routers/web
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
..
admin Fix activation of primary email addresses (#16385) 2021-07-13 22:59:27 +02:00
dev Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
events Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
explore Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
org Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
repo Fix CSV render error (#17406) (#17431) 2021-10-25 18:31:15 +01:00
user Don't panic if we fail to parse U2FRegistration data (#17304) (#17371) 2021-10-20 21:45:17 +02:00
base.go Fix bug of get context user (#17169) (#17172) 2021-09-28 15:42:43 +02:00
goget.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
home.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
metrics.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
swagger_json.go Refactor routers directory (#15800) 2021-06-09 01:33:54 +02:00
web.go Fix wiki raw commit diff/patch view (#16891) (#16892) 2021-08-31 14:13:08 +08:00