add content-length header to webdav_delete and webdav_put webdav

Mon, 02 May 2022 20:26:54 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 02 May 2022 20:26:54 +0200
branch
webdav
changeset 329
d2b2124801f4
parent 328
1c08aa0c060e
child 330
71b652743871

add content-length header to webdav_delete and webdav_put

src/server/webdav/webdav.c file | annotate | diff | comparison | revisions
--- a/src/server/webdav/webdav.c	Mon May 02 20:25:40 2022 +0200
+++ b/src/server/webdav/webdav.c	Mon May 02 20:26:54 2022 +0200
@@ -659,6 +659,7 @@
     
     // send response
     if(ret == REQ_PROCEED) {
+        pblock_nvinsert("content-length", "0", rq->srvhdrs);
         protocol_status(sn, rq, 204, NULL);
         protocol_start_response(sn, rq);
     } else {
@@ -723,6 +724,7 @@
     system_fclose(fd);
     
     int status = create_file ? PROTOCOL_CREATED : PROTOCOL_NO_CONTENT;
+    pblock_nvinsert("content-length", "0", rq->srvhdrs);
     protocol_status(sn, rq, status, NULL);
     protocol_start_response(sn, rq);
     

mercurial