all repos — honk @ 6f60bf1709d4a48631977d3838cd24804a078571

my fork of honk

try a limiter here
Ted Unangst tedu@tedunangst.com
Thu, 03 Oct 2019 01:17:43 -0400
commit

6f60bf1709d4a48631977d3838cd24804a078571

parent

c2664b500d197b9cecf1a8adb0fca2c6705cb687

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M activity.goactivity.go

@@ -149,9 +149,13 @@ localize = false

goto saveit } var buf bytes.Buffer - io.Copy(&buf, resp.Body) + limiter := io.LimitReader(resp.Body, 10 * 1024 * 1024) + io.Copy(&buf, limiter) data = buf.Bytes() + if len(data) == 10 * 1024 * 1024 { + log.Printf("truncation likely") + } if strings.HasPrefix(media, "image") { img, err := image.Vacuum(&buf, image.Params{LimitSize: 4800 * 4800, MaxWidth: 2048, MaxHeight: 2048})