Fix return value of NotFound middleware.
Set mime type automatically for initial request