AdguardTeam / FiltersRegistry

Known filters subscriptions transformed for better compatibility with AdGuard
GNU Lesser General Public License v3.0
253 stars 55 forks source link

`filters.adtidy.org` returns HTTP 200 even when `If-None-Match` matches server `ETag` #1025

Closed SukkaW closed 1 month ago

SukkaW commented 1 month ago

Prerequisites

Problem description

I regularly fetch AdGuard's filter from filters.adtidy.org. To avoid overloading AdGuard's server/CDN, I've implemented a cache based on ETag. However, I've noticed that filters.adtidy.org sometimes returns HTTP 200 instead of HTTP 304, even when the returned ETag matches the sent If-None-Match:

image image

This behavior cannot be reproduced consistently, though:

image

Proposed solution

Check the implementation of AdGuard's registry server and the CDN provider (CDN77) to make sure always returns HTTP 304 when the server ETag matches If-None-Match.

Privacy

Alex-302 commented 1 month ago

@SukkaW But

To avoid overloading AdGuard's server/CDN, I've implemented a cache based on ETag

Do you have many clients? One user usually is not a problem for servers) Also our filters support diff-update https://filters.adtidy.org/extension/chromium/patches/18/18-s-1729265794-3600.patch https://github.com/AdguardTeam/FiltersCompiler/issues/192

D13410N3 commented 1 month ago

Hello. Unfortunately it is not possible right now due to some filters update implementation reasons.