mozilla-services/android-sync — pull request #84 by liuche (2012-02-23 19:37:25+00:00)
Title: Bug 705767: Validate credentials before completing classic setup + rebase

One last issue I haven't been able to fix - a failed auth attempt 401 causes the HttpRequest connection to be "kept alive indefinitely." The subsequent auth request will always hang.

Logcat:

02-23 14:32:02.906: I/BaseResource(4246): Response: HTTP/1.1 401 Unauthorized
02-23 14:32:12.286: I/BaseResource(4246): HTTP GET https://auth.services.mozilla.com/user/1.0/7i77ycjdvltg7xfbsooj3acmdh6mbzbz
02-23 14:32:12.286: D/class ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient(4246): Stale connection check
02-23 14:32:12.286: D/class ch.boye.httpclientandroidlib.client.protocol.RequestAuthCache(4246): Auth cache not set in the context
02-23 14:32:12.528: I/BaseResource(4246): Response: HTTP/1.1 200 OK
02-23 14:32:12.536: I/BaseResource(4246): HTTP GET https://auth.services.mozilla.com/user/1.0/7i77ycjdvltg7xfbsooj3acmdh6mbzbz/node/weave
02-23 14:32:12.546: D/class ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient(4246): Stale connection check
02-23 14:32:12.556: D/class ch.boye.httpclientandroidlib.client.protocol.RequestAuthCache(4246): Auth cache not set in the context
02-23 14:32:12.676: I/BaseResource(4246): Response: HTTP/1.1 200 OK
02-23 14:32:12.686: I/BaseResource(4246): HTTP GET https://scl2-sync395.services.mozilla.com/1.1/7i77ycjdvltg7xfbsooj3acmdh6mbzbz/info/collections/
02-23 14:32:12.706: D/class ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient(4246): Stale connection check
02-23 14:32:12.716: D/class ch.boye.httpclientandroidlib.client.protocol.RequestAuthCache(4246): Auth cache not set in the context
02-23 14:32:12.716: D/class ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient(4246): Attempt 1 to execute request
02-23 14:32:12.726: D/class ch.boye.httpclientandroidlib.impl.conn.DefaultClientConnection(4246): Connection closed
02-23 14:32:12.726: D/class ch.boye.httpclientandroidlib.impl.conn.DefaultClientConnection(4246): Connection shut down

(followed by hang)