summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2007-12-29 21:15:05 (UTC)
committer Michael Krelin <hacker@klever.net>2008-01-04 18:21:47 (UTC)
commitd81fa443c048d6919e98e82fff1fe6013c9deff4 (patch) (unidiff)
tree53e458f164b3e192a9ef8adc67e4141fab9b5a40
parentff04188567b117c28d54d6f81a9dca40ff0b1730 (diff)
downloadlibopkele-d81fa443c048d6919e98e82fff1fe6013c9deff4.zip
libopkele-d81fa443c048d6919e98e82fff1fe6013c9deff4.tar.gz
libopkele-d81fa443c048d6919e98e82fff1fe6013c9deff4.tar.bz2
parse xrd:Expires
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (show 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,5 +1,3 @@
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>
@@ -231,7 +229,6 @@ namespace opkele {
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()));
@@ -253,6 +250,10 @@ namespace opkele {
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{
@@ -305,6 +306,9 @@ namespace opkele {
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 }