From 8b10ea7eac45ee00e128af66d43e0513f7c466e7 Mon Sep 17 00:00:00 2001 From: undownding Date: Wed, 24 Nov 2021 10:33:40 +0800 Subject: [PATCH] fix post nuke.php --- .../src/main/java/sp/phone/http/retrofit/RetrofitHelper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nga_phone_base_3.0/src/main/java/sp/phone/http/retrofit/RetrofitHelper.java b/nga_phone_base_3.0/src/main/java/sp/phone/http/retrofit/RetrofitHelper.java index d39bd1cbc..d2415bc40 100644 --- a/nga_phone_base_3.0/src/main/java/sp/phone/http/retrofit/RetrofitHelper.java +++ b/nga_phone_base_3.0/src/main/java/sp/phone/http/retrofit/RetrofitHelper.java @@ -86,6 +86,9 @@ public OkHttpClient.Builder createOkHttpClientBuilder() { if (request.method().equalsIgnoreCase("post")) { String body = StringUtils.requestBody2String(request.body()); body = URLDecoder.decode(body, "utf-8"); + if (request.url().encodedPath().contains("nuke.php")) { + body = body.replace("charset=utf-8", "charset=gbk"); + } if (body.contains("charset=gbk")) { request = request.newBuilder().post(RequestBody.create(MediaType.parse("application/x-www-form-urlencoded;charset=GBK"), body)).build(); }