Skip to content

Commit

Permalink
introspection: Adds missing http header to response writer (#247)
Browse files Browse the repository at this point in the history
The introspection response writer was missing `application/json`
in header `Content-Type`. This patch fixes that.

Closes #209
  • Loading branch information
arekkas committed Feb 7, 2018
1 parent b94312e commit f345ec1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion introspection_response_writer.go
Expand Up @@ -54,7 +54,7 @@ func (f *Fosite) WriteIntrospectionError(rw http.ResponseWriter, err error) {
return
}

rw.Header().Set("Content-Type", "application/json;charset=UTF-8")
rw.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(rw).Encode(struct {
Active bool `json:"active"`
}{Active: false})
Expand Down Expand Up @@ -195,6 +195,7 @@ func (f *Fosite) WriteIntrospectionResponse(rw http.ResponseWriter, r Introspect
return
}

rw.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(rw).Encode(struct {
Active bool `json:"active"`
ClientID string `json:"client_id,omitempty"`
Expand Down

0 comments on commit f345ec1

Please sign in to comment.