summaryrefslogtreecommitdiffabout
path: root/lib
Unidiff
Diffstat (limited to 'lib') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/discovery.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/discovery.cc b/lib/discovery.cc
index ea53786..3b184ee 100644
--- a/lib/discovery.cc
+++ b/lib/discovery.cc
@@ -1,6 +1,4 @@
1#include <iostream>
2using namespace std;
3#include <list> 1#include <list>
4#include <opkele/curl.h> 2#include <opkele/curl.h>
5#include <opkele/expat.h> 3#include <opkele/expat.h>
6#include <opkele/uris.h> 4#include <opkele/uris.h>
@@ -230,9 +228,8 @@ namespace opkele {
230 } 228 }
231 }else{ 229 }else{
232 int pt_s = pt_stack.size(); 230 int pt_s = pt_stack.size();
233 if(pt_s==1) { 231 if(pt_s==1) {
234 /* TODO: xrd:XRD/xrd:Expires */
235 if(is_qelement(n,NSURI_XRD "\tCanonicalID")) { 232 if(is_qelement(n,NSURI_XRD "\tCanonicalID")) {
236 assert(xrd); 233 assert(xrd);
237 cdata = &(xrd->canonical_ids.add(element_priority(a),string())); 234 cdata = &(xrd->canonical_ids.add(element_priority(a),string()));
238 }else if(is_qelement(n,NSURI_XRD "\tLocalID")) { 235 }else if(is_qelement(n,NSURI_XRD "\tLocalID")) {
@@ -252,8 +249,12 @@ namespace opkele {
252 break; 249 break;
253 } 250 }
254 } 251 }
255 } 252 }
253 }else if(is_qelement(n,NSURI_XRD "\tExpires")) {
254 assert(xrd);
255 cdata_buf.clear();
256 cdata = &cdata_buf;
256 }else if(xmode&xmode_html) { 257 }else if(xmode&xmode_html) {
257 html_start_element(n,a); 258 html_start_element(n,a);
258 }else{ 259 }else{
259 skipping = 1; 260 skipping = 1;
@@ -304,8 +305,11 @@ namespace opkele {
304 pt_stack.pop_back(); 305 pt_stack.pop_back();
305 if(status_code!=100) 306 if(status_code!=100)
306 skipping = -1; 307 skipping = -1;
307 } 308 }
309 }else if(is_qelement(n,NSURI_XRD "\tExpires")) {
310 assert(xrd);
311 xrd->expires = util::w3c_to_time(cdata_buf);
308 }else if((xmode&xmode_html) && is_element(n,"head")) { 312 }else if((xmode&xmode_html) && is_element(n,"head")) {
309 skipping = -1; 313 skipping = -1;
310 } 314 }
311 cdata = 0; 315 cdata = 0;