refactored connection handler. removed documentRoot from request