Why does the httpclient in android check responseCode -1 only?

In HttpClient-android.cpp, responseCode is checked and response->setSucceed() but only if the code equals -1 or not.
In windows implementation, responseCode is validated like below:
(responseCode >= 200 && responseCode < 300)

I got response->isSucess() as true, but the responseCode was 400.
Therefore, I changed the end part of processResponse() in my project from:

if (responseCode == -1)
{
response->setSucceed(false);
response->setErrorBuffer(responseMessage);
}
else
{
response->setSucceed(true);
}

to:

if (!(responseCode >= 200 && responseCode < 300))
{
response->setSucceed(false);
response->setErrorBuffer(responseMessage);
}
else
{
response->setSucceed(true);
}

Does this have any problem?
In addition, I wonder why the initial value of responseCode in HttpURLConnection::getResponseCode() is 0.
I think if JniHelper::getStaticMethodInfo fails, it returns 0 in spite of checking only -1 for error.
This is also same about Cocos2dxHttpURLConnection.java.
The initial code in getResponseCode() is 0.
If some Exceptions occurs, it will return 0.

Thank you.