signal-setup-guide icon indicating copy to clipboard operation
signal-setup-guide copied to clipboard

Android request to server always error code 499

Open boykoy96bg opened this issue 4 years ago • 1 comments

Can you tell me the cause ? Server Version : (Server v4xx)

Client Version : (Android v4xx) Send any request to receive the error code 499 The server works fine when calling postman

private Response makeServiceRequest(String urlFragment, String method, RequestBody body, Map<String, String> headers, ResponseCodeHandler responseCodeHandler, Optional<UnidentifiedAccess> unidentifiedAccessKey) throws NonSuccessfulResponseCodeException, PushNetworkException { Response response = getServiceConnection(urlFragment, method, body, headers, unidentifiedAccessKey);

responseCodeHandler.handle(response.code());

return validateServiceResponse(response);

}

boykoy96bg avatar Jul 12 '21 07:07 boykoy96bg

@Override public @NonNull Response intercept(@NonNull Chain chain) throws IOException { if (SignalStore.misc().isClientDeprecated()) { Log.w(TAG, "Preventing request because client is deprecated."); return new Response.Builder() .request(chain.request()) .protocol(Protocol.HTTP_1_1) .receivedResponseAtMillis(System.currentTimeMillis()) .message("") .body(ResponseBody.create(null, "")) .code(499) .build(); } else { return chain.proceed(chain.request()); } } this is cause but i don't fix

boykoy96bg avatar Jul 13 '21 03:07 boykoy96bg