tests: store ETag when using --headeronly
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 01 Apr 2017 00:21:52 -0700
changeset 31791 39f6333e968c
parent 31790 62f9679df1f2
child 31792 55c0c91f55e6
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.
tests/get-with-headers.py
--- a/tests/get-with-headers.py	Fri Mar 31 21:47:26 2017 -0700
+++ b/tests/get-with-headers.py	Sat Apr 01 00:21:52 2017 -0700
@@ -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