Refs #6245 work around issue for now by setting &format=csv|html in the link to download.
The issue is that this data returned by the method is going through the Api Renderer which then sets the content type header. Instead we should skip the API renderer somehow for these API methods that return data and set their own headers?