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:
authorPhilipp Hörist <philipp@hoerist.com>2023-05-21 15:08:30 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-05-21 15:08:30 +0300
commit8560544bc0aedee6c2a279d615c266bdf94da8fb (patch)
tree36a4739429bc5608251930ca33bbeab0c0b0172c
parent89ab76757035ad6251c2113a595829fa93e4efb9 (diff)
cfix: Check for Soup >= 3.3.0 when using force_http1
-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')