Browse Source

Set content type on discovery rest request.

Phill Luby 11 years ago
parent
commit
609294deee
1 changed files with 1 additions and 0 deletions
  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) {
 func restGetDiscovery(w http.ResponseWriter, r *http.Request) {
+	w.Header().Set("Content-Type", "application/json; charset=utf-8")
 	registry := discoverer.All()
 	registry := discoverer.All()
 	devices := make(map[string][]struct{}, len(registry))
 	devices := make(map[string][]struct{}, len(registry))
 	for device, addrs := range registry {
 	for device, addrs := range registry {