docs: update comments

This commit is contained in:
RockYang 2023-11-30 17:35:56 +08:00
parent dae91ed243
commit f0994ba457

View File

@ -229,16 +229,16 @@ func parameterHandlerMiddleware() gin.HandlerFunc {
params[key][i] = strings.TrimSpace(value) params[key][i] = strings.TrimSpace(value)
} }
} }
// 更新参数 // update get parameters
c.Request.URL.RawQuery = params.Encode() c.Request.URL.RawQuery = params.Encode()
// skip file upload requests
contentType := c.Request.Header.Get("Content-Type") contentType := c.Request.Header.Get("Content-Type")
if strings.Contains(contentType, "multipart/form-data") { if strings.Contains(contentType, "multipart/form-data") {
c.Next() c.Next()
return return
} }
// POST JSON 参数处理 // process POST JSON request body
bodyBytes, err := io.ReadAll(c.Request.Body) bodyBytes, err := io.ReadAll(c.Request.Body)
if err != nil { if err != nil {
c.Next() c.Next()