rest: specify content-type

Signed-off-by: FUJITA Tomonori <[email protected]>
This commit is contained in:
Hiroshi Yokoi
2014-12-25 03:58:11 -08:00
committed by FUJITA Tomonori
parent bcf508cb56
commit 40819efb0c
+2
View File
@@ -195,6 +195,7 @@ func (rs *RestServer) Neighbor(w http.ResponseWriter, r *http.Request) {
http.Error(w, errStr, http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.Write(jns)
}
@@ -224,6 +225,7 @@ func (rs *RestServer) NeighborLocalRib(w http.ResponseWriter, r *http.Request) {
}
res := resInf.(*RestResponseDefault)
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.Write(res.Data)
}