Browse Source

Updated.

v0.6
Mingcai SHEN 5 years ago
parent
commit
e84a05254e
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      service/predictor.go

+ 4
- 3
service/predictor.go View File

@ -55,9 +55,10 @@ func (p Predictor) Next(handler interface{}) restlet.RequestHandler {
panic("unsupported handler: " + reflect.TypeOf(handler).Name())
}
} else {
w.Header().Set("Content-Type", "plain/text")
w.WriteHeader(http.StatusForbidden)
_, _ = w.Write([]byte(s))
return restlet.FailureResponse(w, http.StatusForbidden, s)
//w.Header().Set("Content-Type", "plain/text")
//w.WriteHeader(http.StatusForbidden)
//_, _ = w.Write([]byte(s))
}
return nil
}

Loading…
Cancel
Save