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.
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:
i have no idea why forces ssl when not on port 80. had similar issue androidhttclient defaulthttpclient. seems issue android.
Comments
Post a Comment