Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Correctly apply optimistic concurrency controls to individual storage objects under high write contention. - Time spent metrics are now correctly reported in milliseconds. - Password minimum length error message now correctly reflects the constraint. - Explicitly set response Content-Type header in successful HTTP RPC responses. ## [2.7.0] - 2019-09-11 ### Added Loading server/api_rpc.go +7 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,13 @@ func (s *ApiServer) RpcFuncHttp(w http.ResponseWriter, r *http.Request) { response = []byte(result) } w.WriteHeader(http.StatusOK) if contentType := r.Header["Content-Type"]; unwrap && len(contentType) > 0 { // Assume the request input content type is the same as the expected response. w.Header().Set("content-type", contentType[0]) } else { // Fall back to default response content type application/json. w.Header().Set("content-type", "application/json") } _, err := w.Write(response) if err != nil { s.logger.Debug("Error writing response to client", zap.Error(err)) Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr - Correctly apply optimistic concurrency controls to individual storage objects under high write contention. - Time spent metrics are now correctly reported in milliseconds. - Password minimum length error message now correctly reflects the constraint. - Explicitly set response Content-Type header in successful HTTP RPC responses. ## [2.7.0] - 2019-09-11 ### Added Loading
server/api_rpc.go +7 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,13 @@ func (s *ApiServer) RpcFuncHttp(w http.ResponseWriter, r *http.Request) { response = []byte(result) } w.WriteHeader(http.StatusOK) if contentType := r.Header["Content-Type"]; unwrap && len(contentType) > 0 { // Assume the request input content type is the same as the expected response. w.Header().Set("content-type", contentType[0]) } else { // Fall back to default response content type application/json. w.Header().Set("content-type", "application/json") } _, err := w.Write(response) if err != nil { s.logger.Debug("Error writing response to client", zap.Error(err)) Loading