[Commits] [SCM] claws branch, master, updated. 4.2.0-49-g18909e44a

mones at claws-mail.org mones at claws-mail.org
Tue Feb 13 13:28:48 UTC 2024


The branch, master has been updated
       via  18909e44a8e960ba71ab389e78a9e42cd7576828 (commit)
      from  1b2a0d7913847fe0fc680b02dc31bf4e25e5941e (commit)

Summary of changes:
 src/oauth2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 18909e44a8e960ba71ab389e78a9e42cd7576828
Author: Olaf Hering <olaf at aepfle.de>
Date:   Tue Feb 13 14:26:27 2024 +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 at aepfle.de>

diff --git a/src/oauth2.c b/src/oauth2.c
index bf5fa457e..bb15603cb 100644
--- 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);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list