Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
8560544b by Philipp Hörist at 2023-05-21T14:08:30+02:00
cfix: Check for Soup >= 3.3.0 when using force_http1

- - - - -


1 changed file:

- nbxmpp/http.py


Changes:

=====================================
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')



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/8560544bc0aedee6c2a279d615c266bdf94da8fb

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/8560544bc0aedee6c2a279d615c266bdf94da8fb
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to