Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
[PR] Merge pull request #49 from ColorfulGhost/master
Browse files Browse the repository at this point in the history
[PR] [屏蔽代码] 强校验HTTP 请求头中 contentType utf-8 导致在上游CQHTTPMirai无法运作
  • Loading branch information
hykilpikonna authored Aug 18, 2020
2 parents 12f1c0f + 9f0dc59 commit a2d30a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/cc/moecraft/icq/receiver/PicqHttpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ private boolean validateHeader(HttpExchange exchange)
String userAgent = headers.getFirst("user-agent");

// 必须是 UTF-8
if (!contentType.toLowerCase().contains("charset=utf-8"))
{
return failed(INCORRECT_CHARSET, "Not UTF-8");
}
// if (!contentType.toLowerCase().contains("charset=utf-8"))
// {
// return failed(INCORRECT_CHARSET, "Not UTF-8");
// }

// 必须是 JSON
if (!contentType.contains("application/json"))
Expand Down

0 comments on commit a2d30a4

Please sign in to comment.