Some web servers did not keep the connection open for long enough so
that we cannot keep processing all domains on the fly.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
import datetime
import email.utils
import enum
+import io
import logging
import sqlalchemy.dialects.postgresql
import sqlmodel
log.debug("Source %s has not been changed, skipping processing" % self)
return False
+ buffer = io.StringIO()
+
+ # Read the entire payload into the buffer
+ for chunk in response.iter_text():
+ buffer.write(chunk)
+
+ # Rewind the buffer
+ buffer.seek(0)
+
# Add all domains
- for line in response.iter_lines():
+ for line in buffer:
+ line = line.rstrip()
+
# Detect the format if still unknown
if format is None:
format = self._detect_format(line)