middleware: error page set the content-type
fix #718