I am building an API endpoint for a remote service to call. This endpoint returns XML and sometimes plain text. I am using event.renderData() to generate the response, but there always ends up being exactly 39 extra lines of whitespace in the response. I have gone through all of the handlers in the request stack and can’t figure out where this extra whitespace might be coming from.
I use almost exclusively script based cfcs with output=“false”. I’ve also looked in the RequestContext.cfc to see how renderData works, it looks like it just sets a private request variable but I haven’t been able to figure out where exactly the content gets rendered.
Can anyone suggest where I might look? I’m not a big fan of suppresswhitespace so I’d prefer to avoid using that server wide if possible.