Skip to content

Commit

Permalink
Merge pull request #2849 from pwithnall/request-debugging
Browse files Browse the repository at this point in the history
lib/fetcher: Add some debugging messages to the libsoup request path
  • Loading branch information
cgwalters authored Apr 26, 2023
2 parents 9c548d8 + 77e334e commit b4dcfd7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libostree/ostree-fetcher-soup.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,12 @@ session_thread_request_uri (ThreadClosure *thread_closure,
return;
}

{
g_autofree gchar *uri_str = soup_uri_to_string (soup_request_get_uri (pending->request), FALSE);
g_debug ("%s: starting request %p for URI %s, using GTask %p",
G_STRFUNC, pending->request, uri_str, task);
}

if (SOUP_IS_REQUEST_HTTP (pending->request) && thread_closure->extra_headers)
{
glnx_unref_object SoupMessage *msg = soup_request_http_get_message ((SoupRequestHTTP*) pending->request);
Expand Down Expand Up @@ -1069,6 +1075,10 @@ on_request_sent (GObject *object,
pending->request_body = soup_request_send_finish ((SoupRequest*) object,
result, &local_error);

g_debug ("%s: request %p (GTask %p) finished with request_body %p and error %s",
G_STRFUNC, object, task, pending->request_body,
(local_error != NULL) ? local_error->message : "none");

if (!pending->request_body)
goto out;
g_assert_no_error (local_error);
Expand Down

0 comments on commit b4dcfd7

Please sign in to comment.