diff options
author | Eduardo Chappa <chappa@washington.edu> | 2020-05-18 13:56:00 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2020-05-18 13:56:00 -0600 |
commit | 06f55d13682c0ac4b690bab7ca64f6caf5fd55bd (patch) | |
tree | 669f5831f1088d9567bba3c9532877d90d39c978 /imap/src/c-client/http.h | |
parent | 1e6b822f3fa5bc17ceb94850c15bef643dda393d (diff) | |
download | alpine-06f55d13682c0ac4b690bab7ca64f6caf5fd55bd.tar.xz |
* A few improvements to the http code, which make the http_* functions not return the headers
of a http reply. So, http_get returns the text retrieved retrieverd, without headers. This allows for
simplification of the mm_login_oauth2_c_client function.
Diffstat (limited to 'imap/src/c-client/http.h')
-rw-r--r-- | imap/src/c-client/http.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/imap/src/c-client/http.h b/imap/src/c-client/http.h index 59b7e1d0..c7c0147d 100644 --- a/imap/src/c-client/http.h +++ b/imap/src/c-client/http.h @@ -22,7 +22,7 @@ typedef struct http_param_list_s { } HTTP_PARAM_LIST_S; typedef struct http_header_value_s { - char *data; + unsigned char *data; HTTP_PARAM_LIST_S *p; } HTTP_HEADER_S; @@ -91,8 +91,8 @@ typedef struct http_stream { char *urlhost; /* get original host */ char *urltail; /* the part of the URL after the original host */ HTTP_STATUS_S *status;/* parsed status line from server */ - char *response; /* last reply line from server */ - char *reply; /* the full reply from the server */ + unsigned char *response; /* last reply line from server */ + unsigned char *reply; /* the full reply from the server */ } HTTPSTREAM; /* parameters for a get or post call */ @@ -102,15 +102,15 @@ typedef struct http_param_s { } HTTP_PARAM_S; /* exported prototypes */ -HTTPSTREAM *http_open (char *); -char *http_post_param(char *, HTTP_PARAM_S *); -char *http_post_param2(char *, HTTP_PARAM_S *); -char *http_get_param(char *, HTTP_PARAM_S *); -char *http_get(char *); +HTTPSTREAM *http_open (unsigned char *); +unsigned char *http_post_param(unsigned char *, HTTP_PARAM_S *); +unsigned char *http_post_param2(unsigned char *, HTTP_PARAM_S *); +unsigned char *http_get_param(unsigned char *, HTTP_PARAM_S *); +unsigned char *http_get(unsigned char *); void http_close (HTTPSTREAM *stream); HTTP_PARAM_S *http_param_get(int); void http_param_free(HTTP_PARAM_S **); /* Ugghh.... just construct the URL for a get request */ -char *http_get_param_url(char *, HTTP_PARAM_S *); +unsigned char *http_get_param_url(unsigned char *, HTTP_PARAM_S *); |