src/server/webdav/webdav.c

changeset 20
7b235fa88008
parent 15
cff9c4101dd7
child 24
1a7853a4257e
equal deleted inserted replaced
19:d680536f8c2f 20:7b235fa88008
54 char *ctlen = pblock_findkeyval(pb_key_content_length, rq->headers); 54 char *ctlen = pblock_findkeyval(pb_key_content_length, rq->headers);
55 if(ctlen) { 55 if(ctlen) {
56 xml_len = atoi(ctlen); 56 xml_len = atoi(ctlen);
57 } else { 57 } else {
58 /* invalid request */ 58 /* invalid request */
59 printf("invalid request\n");
59 return REQ_ABORTED; 60 return REQ_ABORTED;
60 } 61 }
61 62
62 xml_body = pool_malloc(sn->pool, xml_len + 1); 63 xml_body = pool_malloc(sn->pool, xml_len + 1);
63 xml_body[xml_len] = 0; 64 xml_body[xml_len] = 0;
64 if(!xml_body) { 65 if(!xml_body) {
65 /* server error */ 66 /* server error */
67 printf("server error\n");
66 return REQ_ABORTED; 68 return REQ_ABORTED;
67 } 69 }
68 70
69 /* TODO: bug with multi reads */ 71 /* TODO: bug with multi reads */
70 int r = 0; 72 int r = 0;

mercurial