You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if body is not empty, check if content type is set to json
61
-
if (r.Method==http.MethodPost||r.Method==http.MethodPut) &&r.ContentLength>0&®exp.MustCompile(`^application\/json(;.*)?$`).MatchString(r.Header.Get("Content-Type")) {
61
+
if (r.Method==http.MethodPost||r.Method==http.MethodPut) &&r.ContentLength>0&&!regexp.MustCompile(`^application\/json(;.*)?$`).MatchString(r.Header.Get("Content-Type")) {
62
62
http.Error(w, "bad request: Content-Type header must be application/json", http.StatusBadRequest)
0 commit comments