449 printf("docroot too short\n"); |
449 printf("docroot too short\n"); |
450 return REQ_ABORTED; /* docroot too short */ |
450 return REQ_ABORTED; /* docroot too short */ |
451 } |
451 } |
452 /* if there is a trailing '/', remove it */ |
452 /* if there is a trailing '/', remove it */ |
453 if(docroot.ptr[docroot.length - 1] == '/') { |
453 if(docroot.ptr[docroot.length - 1] == '/') { |
454 docroot.ptr[docroot.length - 1] = 0; // TODO: can I do this? |
454 //docroot.ptr[docroot.length - 1] = 0; // TODO: can I do this? No!! |
455 docroot.length--; |
455 docroot.length--; |
456 } |
456 } |
457 |
457 |
458 sstr_t uri = sstr(pblock_findkeyval(pb_key_uri, rq->rq.reqpb)); |
458 sstr_t uri = sstr(pblock_findkeyval(pb_key_uri, rq->rq.reqpb)); |
459 |
459 |