handleRequest method
Implementation
Future handleRequest(HttpRequest request) async {
Uri uri = request.uri;
String path = uri.path;
if (path == "/upnp/root.xml") {
await handleRootRequest(request);
} else if (path.startsWith("/upnp/services/") && path.endsWith(".xml")) {
await handleServiceRequest(request);
} else if (path.startsWith("/upnp/control/") && request.method == "POST") {
await handleControlRequest(request);
} else {
request.response
..statusCode = HttpStatus.notFound
..close();
}
}