mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-28 01:43:33 -06:00
[bugfix] Store LastModified for domain perm subs + send as If-Modified-Since (#3655)
This commit is contained in:
parent
9835d3e65d
commit
37fd7c7a6a
11 changed files with 377 additions and 42 deletions
|
|
@ -253,13 +253,9 @@ func (s *Subscriptions) ProcessDomainPermissionSubscription(
|
|||
// to indicate a successful fetch, and return.
|
||||
if resp.Unmodified {
|
||||
l.Debug("received 304 Not Modified from remote")
|
||||
permSub.ETag = resp.ETag
|
||||
permSub.LastModified = resp.LastModified
|
||||
permSub.SuccessfullyFetchedAt = permSub.FetchedAt
|
||||
if permSub.ETag == "" && resp.ETag != "" {
|
||||
// We didn't have an ETag before but
|
||||
// we have one now: probably the remote
|
||||
// added ETag support in the meantime.
|
||||
permSub.ETag = resp.ETag
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
@ -308,6 +304,7 @@ func (s *Subscriptions) ProcessDomainPermissionSubscription(
|
|||
// This can now be considered a successful fetch.
|
||||
permSub.SuccessfullyFetchedAt = permSub.FetchedAt
|
||||
permSub.ETag = resp.ETag
|
||||
permSub.LastModified = resp.LastModified
|
||||
permSub.Error = ""
|
||||
|
||||
// Keep track of which domain perms are
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue