android urlconnection forces ssl -


i trying connect server on port 8080 androidhttpclient forcing not on 8080 use ssl. offending code

    url url = new url("http", "google.com", 8080, "");     httpurlconnection urlconnection = (httpurlconnection) url.openconnection();     urlconnection.setrequestmethod("get");      urlconnection.setrequestproperty("accept", "*/*");      urlconnection.connect(); 

and charles log.

enter image description here

note url field using "https://"

now when change port 80:

url url = new url("http", "google.com", 80, ""); httpurlconnection urlconnection = (httpurlconnection) url.openconnection(); urlconnection.setrequestmethod("get");  urlconnection.setrequestproperty("accept", "*/*");  urlconnection.connect(); 

everything works fine: enter image description here

i have no idea why forces ssl when not on port 80. had similar issue androidhttclient defaulthttpclient. seems issue android.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -