When using render data, such as with the rest handler, I noticed the HTTP Headers for content type is not passed through the request context. This is because the
call in the Bootstrap delegates to
and the datamarshaller directly sets the content type header with the cfcontent tag
which results ultimately in the response HTTP header of
This works find for a normal HTTP request, but when executing a ColdBox REST API in a vacuum like an integration test or the REST over STOMP module, there is no external way to "see" that content type header since it never passes through the request context plumbing. I think this should be refactored to ensure the requestContext.setHTTPHeader() is called so the proper headers can be programmatically captured when an event is being called outside of an HTTPServletRequest.
As a workaround, I'm manually checking for renderdata and pull the content type and encoding from there.