-
-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] [Android] not following redirects for http/https URLs since version 3 #383
Comments
Just confirmed the http/https fact. For these tests I used httpbingo.org/redirect-to and mixing http and https between base and redirect URLs,
✔️ success, status 200 (same results with &status_code=301 instead of 302) |
Android code mostly in HttpRequest seems to rely on java.net.HttpURLConnection toggling redirect through Quick search about http/https redirection links to posts like here in SO and most of all to Android HttpURLConnection Response Handling :
And how okhttp does it for example: RetryAndFollowUpInterceptor#buildRedirectRequest(), with config followSslRedirects |
spec is commented because failing, as detected in issue silkimen#383
spec is commented because failing, as detected in issue silkimen#383
New spec for this issue is ready in PR #396. Help welcome on anything to try, possible fix, or contribution please |
Describe the bug
Some URLs with redirects between http/https were properly resolved in success with plugin version 2.5.1, but are now resolved in error with status 301/302 since 3.0 up to current 3.1.0.
System info
Are you using ionic-native-wrapper?
No
Minimum viable code to reproduce
Seems linked to a requested url on http redirecting to other location and to https - while result is ok if request on https with redirect.
Example: http://foobar.test.com/ gives a 302 to https://www.test.com
with config.xml
Maybe skipped redirect specs #344 can detect this?
The text was updated successfully, but these errors were encountered: