talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 18909e44a8e960ba71ab389e78a9e42cd7576828
parent 1b2a0d7913847fe0fc680b02dc31bf4e25e5941e
Author: Olaf Hering <olaf@aepfle.de>
Date:   Tue, 13 Feb 2024 14:26:27 +0100

oauth2: show body for every HTTP request

Consider also the refresh request, not just the initial request for
obtaining tokens.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

Diffstat:
Msrc/oauth2.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/oauth2.c b/src/oauth2.c @@ -136,6 +136,7 @@ static gint oauth2_post_request (gchar *buf, gchar *host, gchar *resource, gchar { gint len; + debug_print("Complete body: %s\n", body); len = strlen(body); if (header[0]) return snprintf(buf, OAUTH2BUFSIZE, "POST %s HTTP/1.1\r\nContent-Type: application/x-www-form-urlencoded\r\nAccept: text/html,application/json\r\nContent-Length: %i\r\nHost: %s\r\nConnection: close\r\nUser-Agent: ClawsMail\r\n%s\r\n\r\n%s", resource, len, host, header, body); @@ -371,7 +372,6 @@ int oauth2_obtain_tokens (Oauth2Service provider, OAUTH2Data *OAUTH2Data, const header = g_strconcat ("", NULL); } - debug_print("Complete body: %s\n", body); oauth2_post_request (request, OAUTH2info[i][OA2_BASE_URL], OAUTH2info[i][OA2_ACCESS_RESOURCE], header, body); response = oauth2_contact_server (sock, request); debug_print("Response from server: %s\n", response);