diff --git a/intelmq/lib/mixins/http.py b/intelmq/lib/mixins/http.py index 6a6befb96..24ef4f2d1 100644 --- a/intelmq/lib/mixins/http.py +++ b/intelmq/lib/mixins/http.py @@ -50,7 +50,6 @@ class HttpMixin: def __init__(self, **kwargs): self.logger.debug("Running HTTP Mixin initialization.") - self.http_header = {} super().__init__() def setup(self): @@ -70,9 +69,9 @@ def setup(self): self.__auth = (self.http_username, self.http_password) self.__session.auth = self.__auth # headers settings - if self.http_header is not None: + if self.http_header: self.__session.headers.update(self.http_header) - elif self.http_user_agent is not None: + if self.http_user_agent: self.__session.headers.update({"User-Agent": self.http_user_agent}) # proxy settings