Open bosom opened 11 years ago
Are you saying the header isn't properly set?
Sounds to me like codecs is overwriting it when doing the encoding.
On Jul 30, 2013, at 9:29 AM, Mat Ryer notifications@github.com wrote:
Are you saying the header isn't properly set?
— Reply to this email directly or view it on GitHub.
That sounds right - that's an interesting one. We'll look at how we might solve this.
Temporarily made a patch: from
// use the HTTP responder to respond
ctx.HttpResponseWriter().Header().Set("Content-Type", codec.ContentType()) // TODO: test me
to
// use the HTTP responder to respond
if ctx.HttpResponseWriter().Header().Get("Content-Type") == "" {
ctx.HttpResponseWriter().Header().Set("Content-Type", codec.ContentType()) // TODO: test me
}
What do we think about this as a solution?
If use Controllers and set custom encoding, encoding don't work Example:
Bugfix this: File: goweb/responders/goweb_api_responders.go