update router, fixed mime type condition