jsonp does not need Content-Type of application/json

This commit is contained in:
John
2018-04-16 17:15:06 +08:00
parent 9244157490
commit ff945bce86

View File

@ -60,7 +60,7 @@ func (r *Response) WriteJsonP(content interface{}) error {
if b, err := gparser.VarToJson(content); err != nil {
return err
} else {
r.Header().Set("Content-Type", "application/json")
//r.Header().Set("Content-Type", "application/json")
if callback := r.request.Get("callback"); callback != "" {
buffer := []byte(callback)
buffer = append(buffer, byte('('))