Skip to content

Commit 532cbde

Browse files
authored
Merge pull request #3 from SparkPost/splink-detection
adjusted SparkPost link detection logic to reflect current behavior
2 parents e839cbd + c4e1843 commit 532cbde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/consume-mail.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def isSparkPostTrackingEndpoint(s, url, shareRes, openClickTimeout, trackingDoma
271271
else:
272272
# Ping the path prefix for clicks, looking at the first response
273273
r = s.get(baseurl + '/f/a', allow_redirects=False, timeout=openClickTimeout)
274-
isSparky = r.headers.get('Server') == 'msys-http'
274+
isSparky = r.headers.get('Server') == 'msys-http' or r.headers.get('Server') == 'msys-et'
275275
if not isSparky:
276276
err = url + ',status_code ' + str(r.status_code)
277277
# NOTE redis-py now needs data passed in bytestr
@@ -723,4 +723,4 @@ def getUserAgents(cfg, logger):
723723
# Just process once
724724
fnameList = glob.glob(os.path.join(args.directory, '*.msg'))
725725
if fnameList:
726-
consumeFiles(logger, fnameList, cfg)
726+
consumeFiles(logger, fnameList, cfg)

0 commit comments

Comments
 (0)