Explorar o código

Merge pull request #1483 from methane/go-fix-content-type

go: Fix Content-Type
Brittany Mazza %!s(int64=10) %!d(string=hai) anos
pai
achega
941f40ca66
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      frameworks/Go/go/src/hello/hello.go

+ 1 - 1
frameworks/Go/go/src/hello/hello.go

@@ -84,7 +84,7 @@ func main() {
 
 
 // Test 1: JSON serialization
 // Test 1: JSON serialization
 func jsonHandler(w http.ResponseWriter, r *http.Request) {
 func jsonHandler(w http.ResponseWriter, r *http.Request) {
-	w.Header().Set("Content-Type", "application/javascript")
+	w.Header().Set("Content-Type", "application/json")
 	json.NewEncoder(w).Encode(&Message{helloWorldString})
 	json.NewEncoder(w).Encode(&Message{helloWorldString})
 }
 }