Closed loewenheim closed 1 month ago
Possible alternative solution: reject HTML pages received after a temporary redirect, which should be a good heuristic for a login page.
Possible alternative solution: reject HTML pages received after a temporary redirect, which should be a good heuristic for a login page.
Agreed!
We have seen cases where trying to fetch a native source file from a web source can turn up a HTML login page, which is then used for source context. Obviously this is not desirable. On the other hand, in a JS context, it's totally reasonable to have a HTML file as the source file.
I propose we add a flag
may_be_html
(name subject to change) toHttpRemoteFile
that tells the downloader whether a returned HTML file is legit or an error. We would always set this tofalse
from native and true from JS.