Skip to content

Commit 774af92

Browse files
authored
Merge pull request #34 from Betterment/content_type_header
0.9.7 - Return correct application/json content-type header
2 parents d05643d + 9b85973 commit 774af92

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL = /bin/sh
22

3-
VERSION=0.9.6
3+
VERSION=0.9.7
44
BUILD=`git rev-parse HEAD`
55

66
LDFLAGS=-ldflags "-w -s \

Diff for: fakeserver/server.go

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ func (s *server) handleGet(pattern string, responseFunc func() (interface{}, err
8686
w.WriteHeader(http.StatusInternalServerError)
8787
return
8888
}
89+
w.Header().Set("Content-Type", "application/json")
8990
w.Write(bytes)
9091
}).Methods("GET")
9192
}
@@ -110,6 +111,7 @@ func (s *server) handlePost(pattern string, actionFunc func(*http.Request) (inte
110111
w.WriteHeader(http.StatusInternalServerError)
111112
return
112113
}
114+
w.Header().Set("Content-Type", "application/json")
113115
w.Write(bytes)
114116
}).Methods("POST")
115117
}

0 commit comments

Comments
 (0)