ionic-team / ionic-team/cordova-plugin-ionic-webview
Android - hostname converted to IP
- Dominant language
- Objective-C
- Stars
- 493
- Forks
- 410
- PR merge metrics
- No merged PRs in 30d
Description
**Problem**
On Android using a number in `HostName` makes a weird behaviour where the domain name is converted to an IP address and crash the application.
**What is expected to happen?**
It should keep using the domain name (It is part of the http standard to be able to use numbers)
**What does actually happen?**
The number is converted to an ip e.g. 90000 -> `http://0.1.95.144/`
Using https://www.browserling.com/tools/dec-to-ip you can see that 90000 converts to 0.1.95.144
**Reproduce**
Set the Hostname to a number in config.xml-> 90000
```
```
Add a breakpoint in `src/main/java/com/ionicframework/cordova/webview/IonicWebViewEngine.java` -> `onPageStarted()` Method.
First breakpoint hit will be ok, second will show an IP instead of the correct hostname.
First hit:

Second hit:

**Help wanted**
I do not expect to have the problem fix instantly but if someone has an idea where it could come from (even if it is vague), that would be great 👍
Contributor guide
Assessment
This issue has not been assessed yet.