summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2014-12-25 20:24:13 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-25 03:58:11 -0800
commit40819efb0c592d8a23da8bec0006014b43321ac4 (patch)
tree78a21d0016c0609c67cdd7982ef46d02434c0cd8
parentbcf508cb5652d7cf1d3af86d5c903815ac4779bd (diff)
rest: specify content-type
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--api/rest.go2
1 files changed, 2 insertions, 0 deletions
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)
}