add content length and mime types