rc: fix unmarshalable http.AuthFn in options and put in test for marshalability
This commit is contained in:
parent
99eaa76dc8
commit
0693deea1c
3 changed files with 37 additions and 8 deletions
|
@ -229,7 +229,8 @@ func (s *Server) handlePost(w http.ResponseWriter, r *http.Request, path string)
|
|||
fs.Debugf(nil, "rc: %q: reply %+v: %v", path, out, err)
|
||||
err = rc.WriteJSON(w, out)
|
||||
if err != nil {
|
||||
// can't return the error at this point
|
||||
// can't return the error at this point - but have a go anyway
|
||||
writeError(path, in, w, err, http.StatusInternalServerError)
|
||||
fs.Errorf(nil, "rc: failed to write JSON output: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue