use proper response statuses and mime-types