Browse Source

skip if http.StatusNoContent

pull/2274/head
Chris Lu 3 years ago
parent
commit
0b2a92d371
  1. 4
      weed/server/common.go

4
weed/server/common.go

@ -34,6 +34,10 @@ func init() {
}
func writeJson(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{}) (err error) {
if httpStatus == http.StatusNoContent {
return
}
var bytes []byte
if obj != nil {
if r.FormValue("pretty") != "" {

Loading…
Cancel
Save