* monitoring api supports up to 100K bytes in one request, 64K is reasonable
*/
#define MAX_BUFFER_SIZE 65536
-#define MAX_ENCODE_SIZE 2048
struct oauth_s {
char *url;
#define GOOGLE_OAUTH_URL "https://www.googleapis.com/oauth2/v3/token"
#endif
+#ifndef GOOGLE_OAUTH_ACCESS_TOKEN_SIZE
+#define GOOGLE_OAUTH_ACCESS_TOKEN_SIZE 2048
+#endif
+
struct oauth_s;
typedef struct oauth_s oauth_t;
static char *wg_get_authorization_header(wg_callback_t *cb) { /* {{{ */
int status = 0;
- char access_token[256];
- char authorization_header[256];
+ char access_token[GOOGLE_OAUTH_ACCESS_TOKEN_SIZE];
+ char authorization_header[GOOGLE_OAUTH_ACCESS_TOKEN_SIZE+32];
assert((cb->auth != NULL) || gce_check());
if (cb->auth != NULL)