2

if failure authorization my http server send response: 401, binary "401" and send "close socket"

When i test it, send command in CURL, i have:

HTTP/1.1 401 Unauthorized date: Sat, 12 Oct 2013 10:16:31 GMT content-length: 3 connection: close

401

Its AllRight)

BUT, My Loopj client:

 public void onFailure(Throwable e, String response) {
  Log.e("ERROR CONNECT", "ERROR CONNECT:::::::::::::" + response + "|" + e + "|");
 }

ERROR CONNECT:::::::::::::can't resolve host|java.net.SocketException: Connection reset by peer|

Why i have this response: can't resolve host ???

And how i can get response?

1 Answer 1

1

My http server send response: 401, binary "401" and send "close socket" send "close socket" - it is not a standard situation for the client, and this on the client side exception occurs: java.net.SocketException, and this is the explanation for "Connection reset by peer".

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.