From a607477934de19cc762786e907a246e08d48f3e7 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Sun, 2 Mar 2014 23:22:23 -0800 Subject: [PATCH] Set content type so browsers will interpret result as JSON. --- cmd/unread/unread.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/unread/unread.go b/cmd/unread/unread.go index d4a7806..1f2548c 100644 --- a/cmd/unread/unread.go +++ b/cmd/unread/unread.go @@ -94,6 +94,7 @@ func newMailCounter() *mailCounter { func (mc *mailCounter) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") + w.Header().Set("Content-Type", "application/json") c := map[string]int{} for k, v := range mc.counts { if v != 0 {