all repos — honk @ f9745daafdb0dbd68708e59cd9cd1122b6827d89

my fork of honk

some brave souls decided to return 202 for get requests
Ted Unangst tedu@tedunangst.com
Sun, 27 Sep 2020 17:59:11 -0400
commit

f9745daafdb0dbd68708e59cd9cd1122b6827d89

parent

9160eabd159a3d1f54b90625765ddd7be8e8d7a2

1 files changed, 6 insertions(+), 2 deletions(-)

jump to
M activity.goactivity.go

@@ -176,8 +176,12 @@ log.Printf("error fetching %s: %s", url, err)

return nil, err } defer resp.Body.Close() - if resp.StatusCode != 200 { - return nil, fmt.Errorf("not 200: %d %s", resp.StatusCode, url) + switch resp.StatusCode { + case 200: + case 201: + case 202: + default: + return nil, fmt.Errorf("http get not 200: %d %s", resp.StatusCode, url) } var buf bytes.Buffer limiter := io.LimitReader(resp.Body, 10*1024*1024)