Replace response.setChunked(true) with setChunked()