Skip to content

[Bug] [Android] not following redirects for http/https URLs since version 3 #383

@ath0mas

Description

@ath0mas

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

  • affected HTTP plugin version: 3.0.0 to 3.1.0
  • affected platform(s) and version(s): Android
  • affected device(s): devices and emulators
  • cordova version: cordova 10
  • cordova platform version(s): cordova-android 9

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

cordova.plugin.http.get('http://foobar.test.com/', null, null, console.info, console.error);

with config.xml

<edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge">
    <application android:usesCleartextTraffic="true" />
</edit-config>

Maybe skipped redirect specs #344 can detect this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions