A social RSS reader built on the AT Protocol. glean.at
glean atproto atmosphere rss feed social app
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve fetcher

+10 -2
+10 -2
internal/feed/fetcher.go
··· 55 55 return result, newEtag, newLastModified, nil 56 56 } 57 57 58 - if resp == nil || !httpclient.IsRetryable(resp.StatusCode) { 58 + if resp != nil && !httpclient.IsRetryable(resp.StatusCode) { 59 59 return nil, "", "", err 60 60 } 61 61 ··· 88 88 defer resp.Body.Close() 89 89 90 90 if resp.StatusCode == http.StatusNotModified { 91 - return nil, "", "", resp, nil 91 + newEtag := resp.Header.Get("ETag") 92 + if newEtag == "" { 93 + newEtag = etag 94 + } 95 + newLastModified := resp.Header.Get("Last-Modified") 96 + if newLastModified == "" { 97 + newLastModified = lastModified 98 + } 99 + return nil, newEtag, newLastModified, resp, nil 92 100 } 93 101 94 102 if resp.StatusCode == http.StatusTooManyRequests {