Skip to content

Commit 111e275

Browse files
authored
Merge pull request #76 from W-Webber/fix/hifihi-parse-issue
LGTM,修复正确。移除手动设置的 Accept-Encoding 头,让 OkHttp 自动处理 gzip 解压,解决响应体乱码问题。
2 parents f7a1780 + 71b539b commit 111e275

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/main/java/cloud/ohiyou/service/impl/HifihiSignService.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public SignResultVO signIn(String cookie) {
5050
.addHeader("Referer", HifiniConstants.HIFIHI_SIGN_URL)
5151
.addHeader("Accept", "application/json, text/javascript, */*; q=0.01")
5252
.addHeader("Accept-Language", "zh-CN,zh;q=0.9,en;q=0.8")
53-
.addHeader("Accept-Encoding", "gzip, deflate")
5453
.build();
5554

5655
try (Response response = client.newCall(request).execute()) {
@@ -94,7 +93,6 @@ public UserInfoVO getUserInfo(String cookie) {
9493
.addHeader("Referer", HifiniConstants.HIFIHI_BASE_URL + "/")
9594
.addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
9695
.addHeader("Accept-Language", "zh-CN,zh;q=0.9,en;q=0.8")
97-
.addHeader("Accept-Encoding", "gzip, deflate")
9896
.build();
9997

10098
try (Response response = client.newCall(request).execute()) {
@@ -131,7 +129,6 @@ public Integer getSignStreak(String cookie) {
131129
.addHeader("Referer", HifiniConstants.HIFIHI_BASE_URL + "/")
132130
.addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
133131
.addHeader("Accept-Language", "zh-CN,zh;q=0.9,en;q=0.8")
134-
.addHeader("Accept-Encoding", "gzip, deflate")
135132
.build();
136133

137134
try (Response response = client.newCall(request).execute()) {

0 commit comments

Comments
 (0)