1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-06 12:03:50 +08:00
This commit is contained in:
Mrs4s 2020-08-23 13:52:07 +08:00
parent 84a826815d
commit 6b256c8b82

View File

@ -41,7 +41,7 @@ func (s *httpServer) Run(addr, authToken string, bot *coolq.CQBot) {
c.Status(404)
return
}
if c.Request.Method == "POST" && c.Request.Header.Get("Content-Type") == "application/json" {
if c.Request.Method == "POST" && strings.Contains(c.Request.Header.Get("Content-Type"), "application/json") {
d, err := c.GetRawData()
if err != nil {
log.Warnf("获取请求 %v 的Body时出现错误: %v", c.Request.RequestURI, err)