From 40819efb0c592d8a23da8bec0006014b43321ac4 Mon Sep 17 00:00:00 2001 From: Hiroshi Yokoi Date: Thu, 25 Dec 2014 20:24:13 +0900 Subject: [PATCH] rest: specify content-type Signed-off-by: FUJITA Tomonori --- api/rest.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/rest.go b/api/rest.go index a110019e..909fd541 100644 --- a/api/rest.go +++ b/api/rest.go @@ -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) }