Not including charset in Content-Type header

12 views
Skip to first unread message

Troy S

unread,
Nov 20, 2015, 9:05:27 PM11/20/15
to LoopbackJS
This is somewhat baffling. We are creating a new component that adheres to the JSON API spec. Great, wonderful! We have lots of stuff already working and unit tests are great. However, sometimes, the Content-Type header returns "Content-Type: application/vnd.api+json; charset=utf-8", but everytime we set the header, we set it as:

ctx.res.set('Content-Type', 'application/vnd.api+json');

Where the heck is it adding charset=utf-8 and how do we disable it? By the way, sometimes the charset=utf-8 gets applied and sometimes it doesn't. It's really bizarre.
Reply all
Reply to author
Forward
0 new messages