author | Michael Krelin <hacker@klever.net> | 2007-12-29 21:15:05 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-01-04 18:21:47 (UTC) |
commit | d81fa443c048d6919e98e82fff1fe6013c9deff4 (patch) (side-by-side diff) | |
tree | 53e458f164b3e192a9ef8adc67e4141fab9b5a40 | |
parent | ff04188567b117c28d54d6f81a9dca40ff0b1730 (diff) | |
download | libopkele-d81fa443c048d6919e98e82fff1fe6013c9deff4.zip libopkele-d81fa443c048d6919e98e82fff1fe6013c9deff4.tar.gz libopkele-d81fa443c048d6919e98e82fff1fe6013c9deff4.tar.bz2 |
parse xrd:Expires
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | lib/discovery.cc | 10 |
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,5 +1,3 @@ -#include <iostream> -using namespace std; #include <list> #include <opkele/curl.h> #include <opkele/expat.h> @@ -231,7 +229,6 @@ namespace opkele { }else{ int pt_s = pt_stack.size(); if(pt_s==1) { - /* TODO: xrd:XRD/xrd:Expires */ if(is_qelement(n,NSURI_XRD "\tCanonicalID")) { assert(xrd); cdata = &(xrd->canonical_ids.add(element_priority(a),string())); @@ -253,6 +250,10 @@ namespace opkele { } } } + }else if(is_qelement(n,NSURI_XRD "\tExpires")) { + assert(xrd); + cdata_buf.clear(); + cdata = &cdata_buf; }else if(xmode&xmode_html) { html_start_element(n,a); }else{ @@ -305,6 +306,9 @@ namespace opkele { if(status_code!=100) skipping = -1; } + }else if(is_qelement(n,NSURI_XRD "\tExpires")) { + assert(xrd); + xrd->expires = util::w3c_to_time(cdata_buf); }else if((xmode&xmode_html) && is_element(n,"head")) { skipping = -1; } |