Thanks for the reply Robert. Sorry for what is probably a dumb question but is there any way to implement a workaround using the patch or should I forget about using HttpsURLConnection - given that I have no control over if/when a proxy may be used.
Regards, Steve On Thursday, August 9, 2012 9:31:05 AM UTC+10, Robert Greenwalt wrote: > > This is a known problem: > http://code.google.com/p/android/issues/detail?id=35050 > > That link includes info to an AOSP fix that's already available. This > should be included in a future release. > > R > > > On Tue, Aug 7, 2012 at 1:32 PM, Steve Baldwin > <[email protected]<javascript:> > > wrote: > >> From what I read in the documentation, HttpURLConnection is preferred >> over DefaultHttpClient for projects targeting Honeycomb or newer. >> >> I am targeting API 15 for my project so started down this path. >> >> (I connect to my server over https so was of course using >> HttpsURLConnection). >> >> Everything worked great when talking to my server over WiFi but over 3g I >> was getting the following error in my Apache log : >> >> Hostname 202.139.83.152 provided via SNI and hostname myserver.comprovided >> via HTTP are different >> >> The IP address is that of the proxy in the APN setting for my mobile >> carrier. >> >> I dumped out the packets for a WiFi and 3g request and found that in the >> 'Client Hello' packet the Handshake Protocol/Extension:server_name field >> contains the target hostname (myserver.com) for the wifi request but the >> APN proxy address for the 3g request. >> >> (I'm using a stock Samsung Galaxy S3 running Android 4.0.4) >> >> Using either the default browser or Chrome Beta, I can successfully hit >> the URL over 3g. >> >> So, my questions are : >> >> * Do I need to make additional allowances in my code if the >> connection is over 3g and the APN >> includes a proxy setting? >> * Is there some misconfiguration on the part of my mobile carrier? >> * Is this a bug in the HttpsURLConnection code and if so, should I go >> back to using DefaultHttpClient? >> >> Thanks, >> >> Steve >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to >> [email protected]<javascript:> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

