From: Jan Dohl Date: Sat, 3 Feb 2018 22:47:47 +0000 (+0100) Subject: Test to reproduce 304 on etag mismatch issue X-Git-Tag: v5.0.0~7^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c28cb62f6d575a1f5b6a9577ae1356d3e37599f7;p=thirdparty%2Ftornado.git Test to reproduce 304 on etag mismatch issue --- diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py index 646b2f796..39347deb4 100644 --- a/tornado/test/web_test.py +++ b/tornado/test/web_test.py @@ -1081,6 +1081,13 @@ class StaticFileTest(WebTestCase): 'If-None-Match': response1.headers['Etag']}) self.assertEqual(response2.code, 304) + def test_static_304_etag_modified_bug(self): + response1 = self.get_and_head("/static/robots.txt") + response2 = self.get_and_head("/static/robots.txt", headers={ + 'If-None-Match': '"MISMATCH"', + 'If-Modified-Since': response1.headers['Last-Modified']}) + self.assertEqual(response2.code, 200) + def test_static_if_modified_since_pre_epoch(self): # On windows, the functions that work with time_t do not accept # negative values, and at least one client (processing.js) seems