From 4c9564dce14fdc46ef6739426ee1cad87ed58ad1 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Fri, 22 Feb 2008 12:33:42 +0000 Subject: fix the discovery for the case when identity URL points to XRDS document. Signed-off-by: Michael Krelin --- (limited to 'lib/discovery.cc') diff --git a/lib/discovery.cc b/lib/discovery.cc index 5913ad4..c118c80 100644 --- a/lib/discovery.cc +++ b/lib/discovery.cc @@ -200,7 +200,13 @@ namespace opkele { throw exception_curl(OPKELE_CP_ "failed to get CURLINFO_EFFECTIVE_URL",r); string cid = util::strip_uri_fragment_part( idis.canonicalized_id = util::rfc_3986_normalize_uri(eu) ); if(xrds_location.empty()) { - html2xrd(oi,idis); + if(idis.xrd.empty()) + html2xrd(oi,idis); + else{ + for(const service_type_t *st=op_service_types; + st<&op_service_types[sizeof(op_service_types)/sizeof(*op_service_types)];++st) + queue_endpoints(oi,idis,st); + } }else{ idis.clear(); idis.canonicalized_id = cid; -- cgit v0.9.0.2