Check both CURLINFO_RESPONSE_CODE and CURLINFO_HTTP_CONNECTCODE for HTTP status code