Open ShivanKaul opened 2 years ago
For AMP URLs (and there will probably be others), there are cases where the embedded target URL in the original URL that we want to debounce does not have a scheme, for e.g. https://theguadian.ampproject.org/c/s/www.newsarticleonguardian.com -- www.newsarticleonguardian.com is not a valid URL (and hence not parsed as one at least in Chromium and also by iOS it looks like) because it does not have a scheme. We create the right debounce URL by using a new property called prepend_scheme : http | https as described in https://github.com/brave/brave-browser/issues/23121
prepend_scheme : http | https
The trouble is that if the original URL looks something like https://theguadian.ampproject.org/c/s/foo, and prepend_scheme is https, then we debounce to https://foo/, which is not actually a valid website, even though https://foo/ is technically a valid URL.
prepend_scheme
The proposed solution is (@fmarier):
We should do this for all debounce actions.
@pilgrim-brave @pes10k
Sure
lgtm
For AMP URLs (and there will probably be others), there are cases where the embedded target URL in the original URL that we want to debounce does not have a scheme, for e.g. https://theguadian.ampproject.org/c/s/www.newsarticleonguardian.com -- www.newsarticleonguardian.com is not a valid URL (and hence not parsed as one at least in Chromium and also by iOS it looks like) because it does not have a scheme. We create the right debounce URL by using a new property called
prepend_scheme : http | https
as described in https://github.com/brave/brave-browser/issues/23121The trouble is that if the original URL looks something like https://theguadian.ampproject.org/c/s/foo, and
prepend_scheme
is https, then we debounce to https://foo/, which is not actually a valid website, even though https://foo/ is technically a valid URL.The proposed solution is (@fmarier):
We should do this for all debounce actions.