diff tests/get-with-headers.py @ 32570:39f6333e968c

tests: store ETag when using --headeronly Previously, --headeronly would prevent --twice from working because the ETag wasn't stored when --headeronly was used. This feels like a bug. That feeling is reaffirmed by the fact that this change doesn't regress any tests.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 01 Apr 2017 00:21:52 -0700 (2017-04-01)
parents e75463e3179f
children 32317f8bbe2a
line wrap: on
line diff
--- a/tests/get-with-headers.py
+++ b/tests/get-with-headers.py
@@ -78,8 +78,8 @@
         else:
             sys.stdout.write(data)
 
-        if twice and response.getheader('ETag', None):
-            tag = response.getheader('ETag')
+    if twice and response.getheader('ETag', None):
+        tag = response.getheader('ETag')
 
     return response.status