Changeset f924563 for protocols/twitter/twitter_http.c
- Timestamp:
- 2010-05-03T00:52:08Z (15 years ago)
- Branches:
- master
- Children:
- 1a3ba05
- Parents:
- 6a9d068 (diff), 6824fb3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_http.c
r6a9d068 rf924563 29 29 ****************************************************************************/ 30 30 31 #include "twitter_http.h"32 31 #include "twitter.h" 33 32 #include "bitlbee.h" … … 35 34 #include "misc.h" 36 35 #include "base64.h" 36 #include "oauth.h" 37 37 #include <ctype.h> 38 38 #include <errno.h> 39 40 #include "twitter_http.h" 39 41 40 42 … … 45 47 * This is actually pretty generic function... Perhaps it should move to the lib/http_client.c 46 48 */ 47 void *twitter_http(char *url_string, http_input_function func, gpointer data, int is_post, char* user, char* pass, char** arguments, int arguments_len)49 void *twitter_http(char *url_string, http_input_function func, gpointer data, int is_post, char* user, char* pass, struct oauth_info* oi, char** arguments, int arguments_len) 48 50 { 49 51 url_t *url = g_new0( url_t, 1 ); … … 110 112 111 113 // If a pass and user are given we append them to the request. 112 if (userpass_base64) 114 if (oi) 115 { 116 char *full_header; 117 118 full_header = oauth_http_header(oi, is_post ? "POST" : "GET", 119 url_string, url_arguments); 120 121 tmp = g_strdup_printf("%sAuthorization: %s\r\n", request, full_header); 122 g_free(request); 123 g_free(full_header); 124 request = tmp; 125 } 126 else if (userpass_base64) 113 127 { 114 128 tmp = g_strdup_printf("%sAuthorization: Basic %s\r\n", request, userpass_base64);
Note: See TracChangeset
for help on using the changeset viewer.