aports/main/nginx/nginx-dav-ext-module~dav-class-1-2.patch

34 lines
1 KiB
Diff

Patch-Source: https://github.com/arut/nginx-dav-ext-module/pull/46
--
From a44e56c57e5fcf6b769f816f726199c52a8dca8c Mon Sep 17 00:00:00 2001
From: Alexey Lubimov <avlubimov@gmail.com>
Date: Tue, 20 Aug 2019 14:40:43 +0300
Subject: [PATCH] fix DAV class from 2 to 1,2 (like apache)
---
ngx_http_dav_ext_module.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/ngx_http_dav_ext_module.c b/ngx_http_dav_ext_module.c
index 0d6d067..bb5ead4 100644
--- a/ngx_http_dav_ext_module.c
+++ b/ngx_http_dav_ext_module.c
@@ -502,8 +502,16 @@ ngx_http_dav_ext_content_handler(ngx_http_request_t *r)
}
ngx_str_set(&h->key, "DAV");
- h->value.len = 1;
- h->value.data = (u_char *) (dlcf->shm_zone ? "2" : "1");
+
+ if (dlcf->shm_zone) {
+ h->value.len = 3;
+ h->value.data = (u_char *) "1,2";
+ }
+ else {
+ h->value.len = 1;
+ h->value.data = (u_char *) "1";
+ }
+
h->hash = 1;
h = ngx_list_push(&r->headers_out.headers);