27 */ |
27 */ |
28 |
28 |
29 #include "objecttype.h" |
29 #include "objecttype.h" |
30 #include "../util/pblock.h" |
30 #include "../util/pblock.h" |
31 |
31 |
32 #include "../ucx/sstring.h" |
32 #include "../ucx/string.h" |
33 |
33 |
34 int object_type_by_extension(pblock *pb, Session *sn, Request *rq) { |
34 int object_type_by_extension(pblock *pb, Session *sn, Request *rq) { |
35 sstr_t ppath = sstr(pblock_findkeyval(pb_key_ppath, rq->vars)); |
35 sstr_t ppath = sstr(pblock_findkeyval(pb_key_ppath, rq->vars)); |
36 sstr_t ct; |
36 sstr_t ct; |
37 if(ppath.ptr[ppath.length - 1] == '/') { |
37 if(ppath.ptr[ppath.length - 1] == '/') { |