Fix bug 893088 - Use res.format to handle content-type negotiation