Ta.

I've been using a DefaultHttpClient with a
ThreadSafeClientConnectionManager (wonder why I decided I needed that)
and in order to construct the ThreadSafeConnectionManager I needed to
pass in a SchemeRegistry in which I had only been registering http
(since I was only accessing a http address). Now I'll either register
https or just use the default constructors of DefaultHttpClient or
AndroidHttpClient.

Thanks again Nikolay


On Oct 4, 2:40 pm, Nikolay Elenkov <[email protected]> wrote:
> On Tue, Oct 4, 2011 at 1:33 PM, William Ferguson
>
> <[email protected]> wrote:
>
> >> As for the https error, even if you are not trying to access an HTTPS URL,
> >> there might be a proxy in-between, or some other redirect. Especially on
> >> public WiFi networks, people get redirected to all sorts of intermediary 
> >> sites
> >> on first access.
>
> > Thanks Nikolay, I suspected it must be something like that. In that
> > case is registering an SSLSocketFactory on port 443 sufficient? Ie I
> > don't need to try to provide any credentials via the HttpClient?
>
> Unless you are doing something special, both DefaultHttpClient and
> AndroidHttpClient register an SSLSocketFactory for 443 (the difference
> is that AndroidHttpClient uses a ThreadSafeConnectionFactory).
> So technically, you shouldn't need to do anything. Even if you
> register those manually, you don't need to provide credentials
> (certificates), the system defaults will be used. (you don't really
> know where those connections are going anyway).

-- 
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

Reply via email to