Closed samrajput1143 closed 2 years ago
Iam running this code in Ubuntu 18
note that the http server component is not supported, and has NEVER been supported, and probably has bugs and is probably insecure. We recommend you do not use that component (use a real web server like apache or nginx, or IIS, instead).
In any case that is not a valid URI and I wouldn't expect basically any resolver to be able to deal with it.
Is that last line printing "1" or printing "Host not found (authoritative)"
the URI is valid as far as the URI parser is concerned, but that TLD is not a "real" TLD, so you better make sure your dns server knows how to deal with it. In this case it's possible your machine is not correctly assigning that name to itself. You probably want to listen on "[::]" or 0.0.0.0 instead, or a specific IP you have been assigned. Not all systems (esp ones as old as ubuntu 18.04) support assigning hostnames to specific links
Closing this as it's a problem with your DNS setup and we don't support the server component beyound using it to test cpprestsdk itself. Seriously consider using a different server.
below is the part of server side code:->
utility::string_t port = U("8080"); utility::string_t address = U("http://service-ricxapp-bouncer-xapp-http.ricxapp:"); address.append(port); address.append(U("/ric/v1/subscriptions/response")); uri_builder uri(address); auto addr = uri.to_uri().to_string(); http_listener listener(addr);
cout<<uri::validate(addr)<<"\n"; --------> this is printing 1