Skip to content

Commit

Permalink
Set json type when resp
Browse files Browse the repository at this point in the history
  • Loading branch information
dispensable committed Oct 25, 2023
1 parent 2523a6b commit de706f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gobeansproxy/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ type ReloadableCfg struct {
func handleCstarCfgReload(w http.ResponseWriter, r *http.Request) {
defer handleWebPanic(w)

w.Header().Set("Content-Type", "application/json")
resp := make(map[string]string)
cfgName := r.URL.Query().Get("config")
var dispatcher cassandra.PrefixDisPatcher
Expand Down Expand Up @@ -412,6 +413,5 @@ func handleCstarCfgReload(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
resp["message"] = "success"
}
w.Header().Set("Content-Type", "application/json")
handleJson(w, resp)
}

0 comments on commit de706f4

Please sign in to comment.