fix behavior when handling request without routes

fixes #2159