modified POST handler to set content type