From d302f77415b905b5b9c438421d453a688ab5eff1 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@libreserver.org>
Date: Thu, 26 May 2022 22:58:22 +0100
Subject: [PATCH] Supplying extra user agent parameters

---
 happening.py          | 6 ++++--
 session.py            | 4 ++++
 webapp_create_post.py | 2 --
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/happening.py b/happening.py
index 3779af057..b5b0979d2 100644
--- a/happening.py
+++ b/happening.py
@@ -1319,7 +1319,8 @@ def dav_month_via_server(session, http_prefix: str,
         '  </c:filter>\n' + \
         '</c:calendar-query>'
     result = \
-        get_method("REPORT", xml_str, session, url, params, headers, debug)
+        get_method("REPORT", xml_str, session, url, params, headers, debug,
+                   __version__, http_prefix, domain)
     return result
 
 
@@ -1365,5 +1366,6 @@ def dav_day_via_server(session, http_prefix: str,
         '  </c:filter>\n' + \
         '</c:calendar-query>'
     result = \
-        get_method("REPORT", xml_str, session, url, params, headers, debug)
+        get_method("REPORT", xml_str, session, url, params, headers, debug,
+                   __version__, http_prefix, domain)
     return result
diff --git a/session.py b/session.py
index fe6d2a350..f83e238d5 100644
--- a/session.py
+++ b/session.py
@@ -58,6 +58,8 @@ def create_session(proxy_type: str):
 
 def url_exists(session, url: str, timeout_sec: int = 3,
                http_prefix: str = 'https', domain: str = 'testdomain') -> bool:
+    """Is the given url resolvable?
+    """
     if not isinstance(url, str):
         print('url: ' + str(url))
         print('ERROR: url_exists failed, url should be a string')
@@ -738,6 +740,8 @@ def get_method(method_name: str, xml_str: str,
                version: str = __version__, http_prefix: str = 'https',
                domain: str = 'testdomain',
                timeout_sec: int = 20, quiet: bool = False) -> {}:
+    """Part of the vcard interface
+    """
     if method_name not in ("REPORT", "PUT", "PROPFIND"):
         print("Unrecognized method: " + method_name)
         return None
diff --git a/webapp_create_post.py b/webapp_create_post.py
index db4ab398c..97b1d0aa0 100644
--- a/webapp_create_post.py
+++ b/webapp_create_post.py
@@ -379,8 +379,6 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
     new_post_image_section += \
         '      <input type="file" id="attachpic" name="attachpic"'
     formats_string = get_media_formats()
-    # remove svg as a permitted format
-    # formats_string = formats_string.replace(', .svg', '').replace('.svg, ', '')
     new_post_image_section += \
         '            accept="' + formats_string + '">\n'
     new_post_image_section += \