fix mod_header function if resulting value is empty

This commit is contained in:
2020-05-05 13:29:18 +02:00
parent 708cef085e
commit 4a8d416d1c

View File

@@ -196,12 +196,7 @@ class Modification:
if new_value == "":
self.logger.warning(
f"{qid}: {self.name}: mod_header: resulting value is "
f"empty: del_header: {hdr[0:70]}")
del headers[index]
params = [name, new_value, index, occurrences[name]]
changes.append(("mod_header", *params))
index -= 1
occurrences[name] -= 1
f"empty, skip modification")
elif value != new_value:
old_hdr = hdr
hdr = f"{name}: {new_value}"