mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-26 10:08:55 -04:00
tests: web-server: fix an issue with the web server cache
On a decently fast system, some files may be fetched, modified and then
fetched again within the same second. In that case, the web server
replies with a code 304 ("Not modified") to the 2nd query, causing some
tests to fail.
This commit forces the web server to ignore `If-Modified-Since` HTTP
headers, effectively disabling caching in order to mitigate the problem.
This commit is contained in:
@@ -37,6 +37,7 @@ class RequestHandler(http_server.SimpleHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
if self.handle_tokens():
|
||||
return None
|
||||
self.headers.__delitem__("If-Modified-Since")
|
||||
return super().do_GET()
|
||||
|
||||
def run(dir):
|
||||
|
||||
Reference in New Issue
Block a user