File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,13 @@ def get_req_headers(self):
9393 if self .splits :
9494 value = self .splits .scheme
9595
96- elif not has_brotli and name == 'HTTP_ACCEPT_ENCODING' and 'br' in value :
96+ elif name == 'HTTP_ACCEPT_ENCODING' :
9797 # if brotli not available, remove 'br' from accept-encoding to avoid
9898 # capture brotli encoded content
99+ # We have to remove zstd from the list of accepted encodings as warcio does not support it.
100+ disallowed_encodings = ('zstd' ,) if has_brotli else ('zstd' , 'br' )
99101 name = 'Accept-Encoding'
100- value = ',' .join ([enc for enc in value .split (',' ) if enc .strip () != 'br' ])
102+ value = ',' .join ([enc for enc in value .split (',' ) if enc .strip () not in disallowed_encodings ])
101103
102104 elif name .startswith ('HTTP_' ):
103105 name = name [5 :].title ().replace ('_' , '-' )
You can’t perform that action at this time.
0 commit comments