浏览代码

Set content type on discovery rest request.

Phill Luby 11 年之前
父节点
当前提交
609294deee
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      cmd/syncthing/gui.go

+ 1 - 0
cmd/syncthing/gui.go

@@ -451,6 +451,7 @@ func restPostDiscoveryHint(w http.ResponseWriter, r *http.Request) {
 }
 
 func restGetDiscovery(w http.ResponseWriter, r *http.Request) {
+	w.Header().Set("Content-Type", "application/json; charset=utf-8")
 	registry := discoverer.All()
 	devices := make(map[string][]struct{}, len(registry))
 	for device, addrs := range registry {