Jelajahi Sumber

add new option max_resource_size

Peter Bieringer 2 bulan lalu
induk
melakukan
bc2a14481f
3 mengubah file dengan 21 tambahan dan 0 penghapusan
  1. 12 0
      DOCUMENTATION.md
  2. 5 0
      config
  3. 4 0
      radicale/config.py

+ 12 - 0
DOCUMENTATION.md

@@ -801,6 +801,18 @@ Default: `100000000` (100 Mbyte)
 
 In case of using a reverse proxy in front of check also there related option.
 
+##### max_resource_size
+
+_(>= 3.5.10)_
+
+The maximum size of a resource. (bytes)
+
+Default: `10000000` (10 Mbyte)
+
+Limited to 80% of max_content_length to cover plain base64 encoded payload.
+
+Announced to clients requesting "max-resource-size" via PROPFIND.
+
 ##### timeout
 
 Socket timeout. (seconds)

+ 5 - 0
config

@@ -25,6 +25,11 @@
 # In case of using a reverse proxy in front of check also there related option
 #max_content_length = 100000000
 
+# Max resource size (bytes), default: 10 Mbyte
+# Limited to 80% of max_content_length to cover plain base64 encoded payload
+# Announced to clients requesting "max-resource-size" via PROPFIND
+#max_ressource_size = 10000000
+
 # Socket timeout (seconds)
 #timeout = 30
 

+ 4 - 0
radicale/config.py

@@ -164,6 +164,10 @@ DEFAULT_CONFIG_SCHEMA: types.CONFIG_SCHEMA = OrderedDict([
             "value": "100000000",
             "help": "maximum size of request body in bytes (default: 100 Mbyte)",
             "type": positive_int}),
+        ("max_resource_size", {
+            "value": "10000000",
+            "help": "maximum size of resource (default: 10 Mbyte)",
+            "type": positive_int}),
         ("timeout", {
             "value": "30",
             "help": "socket timeout",