Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libsoup for openSUSE:Factory checked 
in at 2022-09-07 11:05:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libsoup (Old)
 and      /work/SRC/openSUSE:Factory/.libsoup.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libsoup"

Wed Sep  7 11:05:24 2022 rev:136 rq:1001365 version:3.0.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/libsoup/libsoup.changes  2022-07-09 
16:59:35.176485592 +0200
+++ /work/SRC/openSUSE:Factory/.libsoup.new.2083/libsoup.changes        
2022-09-07 11:05:25.648313622 +0200
@@ -1,0 +2,7 @@
+Fri Sep  2 18:35:57 UTC 2022 - Bj??rn Lie <bjorn....@gmail.com>
+
+- Update to version 3.0.8:
+  + Fix `http` proxy authentication with default proxy resolver.
+  + Numerous improvments to HTTP/2 reliability.
+
+-------------------------------------------------------------------

Old:
----
  libsoup-3.0.7.tar.xz

New:
----
  libsoup-3.0.8.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libsoup.spec ++++++
--- /var/tmp/diff_new_pack.kIaXS1/_old  2022-09-07 11:05:26.116314812 +0200
+++ /var/tmp/diff_new_pack.kIaXS1/_new  2022-09-07 11:05:26.120314822 +0200
@@ -18,7 +18,7 @@
 
 %define api_version 3.0
 Name:           libsoup
-Version:        3.0.7
+Version:        3.0.8
 Release:        0
 Summary:        HTTP client/server library for GNOME
 License:        LGPL-2.1-or-later

++++++ libsoup-3.0.7.tar.xz -> libsoup-3.0.8.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsoup-3.0.7/NEWS new/libsoup-3.0.8/NEWS
--- old/libsoup-3.0.7/NEWS      2022-06-30 19:11:48.000000000 +0200
+++ new/libsoup-3.0.8/NEWS      2022-09-02 20:30:50.000000000 +0200
@@ -1,3 +1,8 @@
+Changes in libsoup from 3.0.7 to 3.0.8:
+
+* Fix `http` proxy authentication with default proxy resolver [Carlos Garcia 
Campos]
+* Numerous improvments to HTTP/2 reliability [Carlos Garcia Campos]
+
 Changes in libsoup from 3.0.6 to 3.0.7:
 
 * Fix leak in SoupAuthNTLM [Milan Crha]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libsoup-3.0.7/libsoup/http2/soup-client-message-io-http2.c 
new/libsoup-3.0.8/libsoup/http2/soup-client-message-io-http2.c
--- old/libsoup-3.0.7/libsoup/http2/soup-client-message-io-http2.c      
2022-06-30 19:11:48.000000000 +0200
+++ new/libsoup-3.0.8/libsoup/http2/soup-client-message-io-http2.c      
2022-09-02 20:30:50.000000000 +0200
@@ -116,6 +116,7 @@
         gpointer completion_data;
         SoupHTTP2IOState state;
         GError *error;
+        uint32_t http2_error;
         gboolean paused;
         guint32 stream_id;
         gboolean can_be_restarted;
@@ -268,6 +269,20 @@
 }
 
 static void
+set_http2_error_for_data (SoupHTTP2MessageData *data,
+                          uint32_t              error_code)
+{
+        h2_debug (data->io, data, "[SESSION] Error: %s", 
nghttp2_http2_strerror (error_code));
+
+        if (data->error)
+                return;
+
+        data->http2_error = error_code;
+        data->error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED,
+                                   "HTTP/2 Error: %s", nghttp2_http2_strerror 
(error_code));
+}
+
+static void
 set_io_error (SoupClientMessageIOHTTP2 *io,
               GError                   *error)
 {
@@ -277,6 +292,11 @@
                 io->error = error;
         else
                 g_error_free (error);
+
+        if (io->close_task && !io->goaway_sent) {
+                g_task_return_boolean (io->close_task, TRUE);
+                g_clear_object (&io->close_task);
+        }
 }
 
 static void
@@ -303,6 +323,22 @@
         data->state = to;
 }
 
+static gboolean
+soup_http2_message_data_can_be_restarted (SoupHTTP2MessageData *data,
+                                          GError               *error)
+{
+        if (data->can_be_restarted)
+                return TRUE;
+
+        return data->state < STATE_READ_DATA_START &&
+                !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT) &&
+                !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK) &&
+                !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) &&
+                error->domain != G_TLS_ERROR &&
+                data->http2_error == NGHTTP2_NO_ERROR &&
+                SOUP_METHOD_IS_IDEMPOTENT (soup_message_get_method 
(data->msg));
+}
+
 static void
 soup_http2_message_data_check_status (SoupHTTP2MessageData *data)
 {
@@ -314,6 +350,7 @@
         if (g_cancellable_set_error_if_cancelled (g_task_get_cancellable 
(task), &error)) {
                 io->pending_io_messages = g_list_remove 
(io->pending_io_messages, data);
                 data->task = NULL;
+                soup_client_message_io_http2_finished ((SoupClientMessageIO 
*)io, msg);
                 g_task_return_error (task, error);
                 g_object_unref (task);
                 return;
@@ -328,7 +365,7 @@
         if (data->error) {
                 GError *error = g_steal_pointer (&data->error);
 
-                if (data->can_be_restarted)
+                if (soup_http2_message_data_can_be_restarted (data, error))
                         data->item->state = SOUP_MESSAGE_RESTARTING;
                 else
                         soup_message_set_metrics_timestamp (data->msg, 
SOUP_MESSAGE_METRICS_RESPONSE_END);
@@ -397,7 +434,7 @@
                 return G_SOURCE_REMOVE;
         }
 
-        while (nghttp2_session_want_write (io->session) && !error)
+        while (!error && nghttp2_session_want_write (io->session))
                 io_write (io, FALSE, NULL, &error);
 
         if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) {
@@ -425,7 +462,7 @@
                 if (blocking || !nghttp2_session_want_write (io->session))
                         return;
         } else {
-                while (nghttp2_session_want_write (io->session) && !error)
+                while (!error && nghttp2_session_want_write (io->session))
                         io_write (io, blocking, NULL, &error);
         }
 
@@ -433,6 +470,8 @@
                 g_clear_error (&error);
                 io->write_source = g_pollable_output_stream_create_source 
(G_POLLABLE_OUTPUT_STREAM (io->ostream), NULL);
                 g_source_set_name (io->write_source, "Soup HTTP/2 write 
source");
+                /* Give write more priority than read */
+                g_source_set_priority (io->write_source, G_PRIORITY_DEFAULT - 
1);
                 g_source_set_callback (io->write_source, 
(GSourceFunc)io_write_ready, io, NULL);
                 g_source_attach (io->write_source, 
g_main_context_get_thread_default ());
         }
@@ -451,14 +490,24 @@
         gssize read;
         int ret;
 
+        /* Always try to write before read, in case there's a pending reset 
stream after an error. */
+        io_try_write (io, blocking);
+
         if ((read = g_pollable_stream_read (io->istream, buffer, sizeof 
(buffer),
                                             blocking, cancellable, error)) < 0)
             return FALSE;
 
+        if (read == 0) {
+                g_set_error_literal (error, G_IO_ERROR,
+                                     G_IO_ERROR_PARTIAL_INPUT,
+                                     _("Connection terminated unexpectedly"));
+                return FALSE;
+        }
+
         g_warn_if_fail (io->in_callback == 0);
         ret = nghttp2_session_mem_recv (io->session, buffer, read);
         NGCHECK (ret);
-        return ret != 0;
+        return ret > 0;
 }
 
 static gboolean
@@ -479,7 +528,7 @@
         if (io->conn)
                 soup_connection_set_in_use (io->conn, TRUE);
 
-        while (nghttp2_session_want_read (io->session) && progress) {
+        while (progress && nghttp2_session_want_read (io->session)) {
                 progress = io_read (io, FALSE, NULL, &error);
                 if (progress) {
                         g_list_foreach (io->pending_io_messages,
@@ -495,6 +544,8 @@
                 return G_SOURCE_CONTINUE;
         }
 
+        io->is_shutdown = TRUE;
+
         if (error) {
                 set_io_error (io, error);
                 g_list_foreach (io->pending_io_messages,
@@ -502,8 +553,6 @@
                                 NULL);
         }
 
-        io->is_shutdown = TRUE;
-
         g_clear_pointer (&io->read_source, g_source_unref);
         if (io->conn)
                 soup_connection_set_in_use (io->conn, FALSE);
@@ -663,8 +712,7 @@
                 if ((error_code == 0 && (int32_t)data->stream_id > 
last_stream_id) ||
                      data->state < STATE_READ_DONE) {
                         /* TODO: We can restart unfinished messages */
-                        set_error_for_data (data, g_error_new (G_IO_ERROR, 
G_IO_ERROR_FAILED,
-                                            "HTTP/2 Error: %s", 
nghttp2_http2_strerror (error_code)));
+                        set_http2_error_for_data (data, error_code);
                 }
         }
 }
@@ -778,10 +826,8 @@
                 }
                 break;
         case NGHTTP2_RST_STREAM:
-                if (frame->rst_stream.error_code != NGHTTP2_NO_ERROR) {
-                        set_error_for_data (data, g_error_new_literal 
(G_IO_ERROR, G_IO_ERROR_FAILED,
-                                                                       
nghttp2_http2_strerror (frame->rst_stream.error_code)));
-                }
+                if (frame->rst_stream.error_code != NGHTTP2_NO_ERROR)
+                        set_http2_error_for_data (data, 
frame->rst_stream.error_code);
                 break;
         case NGHTTP2_WINDOW_UPDATE:
                 h2_debug (io, data, "[RECV] WINDOW_UPDATE: increment=%d, 
total=%d", frame->window_update.window_size_increment,
@@ -965,14 +1011,19 @@
         data->io->in_callback++;
 
         switch (error_code) {
+        case NGHTTP2_NO_ERROR:
+                break;
         case NGHTTP2_REFUSED_STREAM:
-                if (data->state < STATE_READ_DATA)
+                if (data->state < STATE_READ_DATA_START)
                         data->can_be_restarted = TRUE;
                 break;
         case NGHTTP2_HTTP_1_1_REQUIRED:
                 soup_message_set_force_http_version (data->item->msg, 
SOUP_HTTP_1_1);
                 data->can_be_restarted = TRUE;
                 break;
+        default:
+                set_http2_error_for_data (data, error_code);
+                break;
         }
 
         data->io->in_callback--;
@@ -1408,6 +1459,7 @@
        SoupMessageIOCompletionFn completion_cb;
        gpointer completion_data;
         SoupMessageIOCompletion completion;
+        gboolean is_closed;
 
         data = get_data_for_message (io, msg);
 
@@ -1420,9 +1472,10 @@
 
        g_object_ref (msg);
 
+        is_closed = nghttp2_session_get_stream_user_data (io->session, 
data->stream_id) == NULL;
         nghttp2_session_set_stream_user_data (io->session, data->stream_id, 
NULL);
 
-        if (!io->is_shutdown) {
+        if (!io->is_shutdown && !is_closed) {
                 NGCHECK (nghttp2_submit_rst_stream (io->session, 
NGHTTP2_FLAG_NONE, data->stream_id,
                                                     completion == 
SOUP_MESSAGE_IO_COMPLETE ? NGHTTP2_NO_ERROR : NGHTTP2_CANCEL));
                 soup_http2_message_data_close (data);
@@ -1617,11 +1670,13 @@
                 progress = io_run (data, cancellable, &my_error);
 
         if (my_error) {
-                g_propagate_error (error, my_error);
-                g_object_unref (msg);
-                return FALSE;
+                io->is_shutdown = TRUE;
+                set_io_error (io, my_error);
         }
 
+        if (io->error && !data->error)
+                data->error = g_error_copy (io->error);
+
        if (data->error) {
                 g_propagate_error (error, g_steal_pointer (&data->error));
                g_object_unref (msg);
@@ -1650,12 +1705,13 @@
 {
         SoupClientMessageIOHTTP2 *io = (SoupClientMessageIOHTTP2 *)iface;
         SoupHTTP2MessageData *data = get_data_for_message (io, msg);
+        GError *my_error = NULL;
 
-        if (io_run_until (io, msg, STATE_READ_DATA, cancellable, error))
+        if (io_run_until (io, msg, STATE_READ_DATA, cancellable, &my_error))
                 return TRUE;
 
         if (get_io_data (msg) == io) {
-                if (data->can_be_restarted)
+                if (soup_http2_message_data_can_be_restarted (data, my_error))
                         data->item->state = SOUP_MESSAGE_RESTARTING;
                 else
                         soup_message_set_metrics_timestamp (msg, 
SOUP_MESSAGE_METRICS_RESPONSE_END);
@@ -1663,6 +1719,8 @@
                 soup_client_message_io_http2_finished (iface, msg);
         }
 
+        g_propagate_error (error, my_error);
+
         return FALSE;
 }
 
@@ -1845,6 +1903,7 @@
 
         io->read_source = g_pollable_input_stream_create_source 
(G_POLLABLE_INPUT_STREAM (io->istream), NULL);
         g_source_set_name (io->read_source, "Soup HTTP/2 read source");
+        g_source_set_priority (io->read_source, G_PRIORITY_DEFAULT);
         g_source_set_callback (io->read_source, (GSourceFunc)io_read_ready, 
io, NULL);
         g_source_attach (io->read_source, g_main_context_get_thread_default 
());
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsoup-3.0.7/libsoup/soup-connection.c 
new/libsoup-3.0.8/libsoup/soup-connection.c
--- old/libsoup-3.0.7/libsoup/soup-connection.c 2022-06-30 19:11:48.000000000 
+0200
+++ new/libsoup-3.0.8/libsoup/soup-connection.c 2022-09-02 20:30:50.000000000 
+0200
@@ -514,13 +514,14 @@
                                  G_CALLBACK (re_emit_socket_event),
                                  conn, 0);
 
-       if (!props->proxy_use_default) {
-               if (props->proxy_resolver) {
-                       g_socket_client_set_proxy_resolver (client, 
props->proxy_resolver);
-                       g_socket_client_add_application_proxy (client, "http");
-               } else
-                       g_socket_client_set_enable_proxy (client, FALSE);
-       }
+        if (!props->proxy_use_default && !props->proxy_resolver) {
+                g_socket_client_set_enable_proxy (client, FALSE);
+        } else {
+                if (props->proxy_resolver)
+                        g_socket_client_set_proxy_resolver (client, 
props->proxy_resolver);
+                g_socket_client_add_application_proxy (client, "http");
+        }
+
         if (props->io_timeout)
                 g_socket_client_set_timeout (client, props->io_timeout);
         if (props->local_addr)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsoup-3.0.7/meson.build 
new/libsoup-3.0.8/meson.build
--- old/libsoup-3.0.7/meson.build       2022-06-30 19:11:48.000000000 +0200
+++ new/libsoup-3.0.8/meson.build       2022-09-02 20:30:50.000000000 +0200
@@ -1,5 +1,5 @@
 project('libsoup', 'c',
-        version: '3.0.7',
+        version: '3.0.8',
         meson_version : '>= 0.54',
         license : 'LGPL-2.0-or-later',
         default_options : [
@@ -19,7 +19,7 @@
 #
 # When bumping the first component version, set the second and third components
 # to 0. When bumping the second version, set the third one to zero.
-libversion = '0.0.5'
+libversion = '0.0.6'
 apiversion = '3.0'
 soversion = libversion.split('.')[0]
 libsoup_api_name = '@0@-@1@'.format(meson.project_name(), apiversion)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsoup-3.0.7/tests/http2-test.c 
new/libsoup-3.0.8/tests/http2-test.c
--- old/libsoup-3.0.7/tests/http2-test.c        2022-06-30 19:11:48.000000000 
+0200
+++ new/libsoup-3.0.8/tests/http2-test.c        2022-09-02 20:30:50.000000000 
+0200
@@ -217,12 +217,8 @@
         soup_session_send_and_read_async (test->session, msg, 
G_PRIORITY_DEFAULT, cancellable,
                                           
(GAsyncReadyCallback)on_send_and_read_cancelled_complete, &done);
 
-        /* Just iterate until a partial read is happening */
-        for (guint i = 100000; i; i--)
-                g_main_context_iteration (async_context, FALSE);
-
-        /* Then cancel everything */
-        g_cancellable_cancel (cancellable);
+        /* Cancel right after getting the headers */
+        g_signal_connect_swapped (msg, "got-headers", G_CALLBACK 
(g_cancellable_cancel), cancellable);
 
         while (!done)
                 g_main_context_iteration (async_context, FALSE);

Reply via email to