Open ColinTree opened 6 years ago
Based on the Android Documentation, this is the expected behavior of HttpURLConnection (which Web uses). It specifically does not handle redirects from HTTP to HTTPS (and vice versa), but otherwise follows up to five redirect requests. I do not think we want to change the behavior of the Web component to silently follow changes in the protocol, except maybe adding a property that would allow upgrades from HTTP to HTTPS if enabled.
What about just add a property for this, like named CatchRedirect
301 may be returned when a request is sended, but GotText/GotFile does not catch this for user. As a result of this, the returning url argument of events are probebly not up to date with the request.
BTW, this seems to be only happened when the original url and the targeting url are in a same protocal. With my test result (website host anonymized):