OpenWPM
OpenWPM copied to clipboard
DNS Instrument only records the final request in a redirect chain
Originally reported in #989, but I noticed it myself while playing around with some crawl data recently. The problem stems from the listener we're using to record DNS entries.
https://github.com/openwpm/OpenWPM/blob/ab5fac2d7b81f9b05704bd7460b3b20aa8f23f7b/Extension/src/background/dns-instrument.ts#L29-L44
The onCompleted event is only fired after redirects are resolved. Instead, we want to use an event that is part of the redirect loop. e.g., onHeadersReceived. I tested this and it works well, but I still need to add some tests.