src/server/webdav/webdav.c

branch
webdav
changeset 235
4990147c58d0
parent 234
f30740c3aafb
child 236
e81d3e517b57
--- a/src/server/webdav/webdav.c	Sat Jan 18 16:48:03 2020 +0100
+++ b/src/server/webdav/webdav.c	Sun Jan 19 09:01:39 2020 +0100
@@ -45,6 +45,7 @@
 #include "../util/util.h"
 #include "../daemon/session.h"
 #include "../daemon/http.h"
+#include "../daemon/protocol.h"
 
 static UcxMap *method_handler_map;
 
@@ -162,6 +163,15 @@
 }
 
 int webdav_propfind(pblock *pb, Session *sn, Request *rq) {
+    char *expect = pblock_findkeyval(pb_key_expect, rq->headers);
+    if(expect) {
+        if(!strcasecmp(expect, "100-continue")) {
+            if(http_send_continue(sn)) {
+                return REQ_ABORTED;
+            }
+        }
+    }
+    
     UcxBuffer *reqbody = rqbody2buffer(sn, rq);
     if(!reqbody) {
         return REQ_ABORTED;

mercurial