src/server/webdav/webdav.c

branch
webdav
changeset 340
03c052d9a097
parent 331
ab26980faad6
child 344
70a9b945206a
equal deleted inserted replaced
339:f4a34b0869c7 340:03c052d9a097
691 // PUT on collections is not allowed 691 // PUT on collections is not allowed
692 protocol_status(sn, rq, PROTOCOL_METHOD_NOT_ALLOWED, NULL); 692 protocol_status(sn, rq, PROTOCOL_METHOD_NOT_ALLOWED, NULL);
693 return REQ_ABORTED; 693 return REQ_ABORTED;
694 } 694 }
695 695
696 SYS_FILE fd = vfs_open(vfs, path, O_WRONLY | create_file); 696 SYS_FILE fd = vfs_open(vfs, path, O_WRONLY | O_TRUNC | create_file);
697 if(!fd) { 697 if(!fd) {
698 // if it fails, vfs_open sets http status code 698 // if it fails, vfs_open sets http status code
699 return REQ_ABORTED; 699 return REQ_ABORTED;
700 } 700 }
701 701

mercurial