Description: Introduce function for performance of keep-alive and to allow WebDAV uploads
Origin: https://hg.orthanc-server.com/orthanc/file/default/OrthancFramework/Resources/Patches/civetweb-1.13.patch
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- civetweb.orig/include/civetweb.h
+++ civetweb/include/civetweb.h
@@ -1826,6 +1826,9 @@
                                   struct mg_error_data *error);
 
 
+// Added by SJ
+CIVETWEB_API void mg_disable_keep_alive(struct mg_connection *conn);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
--- civetweb.orig/src/civetweb.c
+++ civetweb/src/civetweb.c
@@ -10859,6 +10859,11 @@
     /* + MicroSoft extensions
      * https://msdn.microsoft.com/en-us/library/aa142917.aspx */
 
+    /* Added by SJ, for write access to WebDAV on Windows >= 7 */
+    {"LOCK", 1, 1, 0, 0, 0},
+    {"UNLOCK", 1, 0, 0, 0, 0},
+    {"PROPPATCH", 1, 1, 0, 0, 0},
+    
     /* REPORT method (RFC 3253) */
     {"REPORT", 1, 1, 1, 1, 1},
     /* REPORT method only allowed for CGI/Lua/LSP and callbacks. */
@@ -22516,4 +22521,12 @@
 }
 
 
+// Added by SJ
+void mg_disable_keep_alive(struct mg_connection *conn)
+{
+  if (conn != NULL) {
+    conn->must_close = 1;
+  }
+}
+ 
 /* End of civetweb.c */
