Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'nbxmpp/http.py')
-rw-r--r--nbxmpp/http.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nbxmpp/http.py b/nbxmpp/http.py
index 455fb30..e44255c 100644
--- a/nbxmpp/http.py
+++ b/nbxmpp/http.py
@@ -50,6 +50,7 @@ HTTP_METHODS_T = Literal[
CHUNK_SIZE = 32768
DEFAULT_USER_AGENT = f'nbxmpp/{nbxmpp.__version__}'
SIGNAL_ACTIONS = GObject.SignalFlags.RUN_LAST | GObject.SignalFlags.ACTION
+MIN_SOUP_3_3_0 = Soup.check_version(3, 3, 0)
class HTTPLogAdapter(logging.LoggerAdapter):
@@ -129,7 +130,8 @@ class HTTPRequest(GObject.GObject):
self._emit_response_progress = False
self._message = Soup.Message()
- self._message.set_force_http1(force_http1)
+ if MIN_SOUP_3_3_0:
+ self._message.set_force_http1(force_http1)
self._user_data = None
self._log.info('Created')