1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-06-15 19:15:24 +00:00

🐛 Fix downloading of pages that are too large or timed out

This commit is contained in:
makeworld 2020-12-24 23:40:55 -05:00
parent 36d4f817c7
commit 193179ad34
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Don't use cache when URL is typed in bottom bar (#159)
- Fix downloading of pages that are too large or timed out
## [1.7.2] - 2020-12-21
### Fixed

View File

@ -65,7 +65,7 @@ func MakePage(url string, res *gemini.Response, width, leftMargin int, proxied b
buf := new(bytes.Buffer)
_, err := io.CopyN(buf, res.Body, viper.GetInt64("a-general.page_max_size")+1)
res.Body.Close()
if err == nil {
// Content was larger than max size
return nil, ErrTooLarge