Loading lib/formdata.c +9 −9 Original line number Diff line number Diff line Loading @@ -481,7 +481,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, return_value = CURL_FORMADD_OPTION_TWICE; else current_form->namelength = array_state?(long)array_value:(long)va_arg(params, long); array_state?(size_t)array_value:(size_t)va_arg(params, long); break; /* Loading @@ -506,7 +506,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, return_value = CURL_FORMADD_OPTION_TWICE; else current_form->contentslength = array_state?(long)array_value:va_arg(params, long); array_state?(size_t)array_value:(size_t)va_arg(params, long); break; /* Get contents from a given file name */ Loading @@ -514,7 +514,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, if (current_form->flags != 0) return_value = CURL_FORMADD_OPTION_TWICE; else { char *filename = array_state? const char *filename = array_state? array_value:va_arg(params, char *); if (filename) { current_form->value = strdup(filename); Loading @@ -533,7 +533,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, /* We upload a file */ case CURLFORM_FILE: { char *filename = array_state?array_value: const char *filename = array_state?array_value: va_arg(params, char *); if (current_form->value) { Loading Loading @@ -567,7 +567,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, case CURLFORM_BUFFER: { char *filename = array_state?array_value: const char *filename = array_state?array_value: va_arg(params, char *); if (current_form->value) { Loading Loading @@ -615,12 +615,12 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, return_value = CURL_FORMADD_OPTION_TWICE; else current_form->bufferlength = array_state?(long)array_value:va_arg(params, long); array_state?(size_t)array_value:(size_t)va_arg(params, long); break; case CURLFORM_CONTENTTYPE: { char *contenttype = const char *contenttype = array_state?array_value:va_arg(params, char *); if (current_form->contenttype) { if (current_form->flags & HTTPPOST_FILENAME) { Loading Loading @@ -666,7 +666,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, } case CURLFORM_FILENAME: { char *filename = array_state?array_value: const char *filename = array_state?array_value: va_arg(params, char *); if( current_form->showfilename ) return_value = CURL_FORMADD_OPTION_TWICE; Loading Loading @@ -1055,7 +1055,7 @@ static char *basename(char *path) } #endif static char *strippath(char *fullfile) static char *strippath(const char *fullfile) { char *filename; char *base; Loading lib/ftp.c +4 −4 Original line number Diff line number Diff line Loading @@ -374,7 +374,7 @@ static CURLcode ftp_readresp(curl_socket_t sockfd, /* we got a whole chunk of data, which can be anything from one * byte to a set of lines and possible just a piece of the last * line */ int i; ssize_t i; data->reqdata.keep.headerbytecount += gotbytes; Loading Loading @@ -661,7 +661,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ /* we got a whole chunk of data, which can be anything from one * byte to a set of lines and possible just a piece of the last * line */ int i; ssize_t i; data->reqdata.keep.headerbytecount += gotbytes; Loading Loading @@ -3340,7 +3340,7 @@ static CURLcode ftp_nb_type(struct connectdata *conn, { struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result; int want = ascii?'A':'I'; char want = ascii?'A':'I'; if (ftpc->transfertype == want) { state(conn, newstate); Loading @@ -3351,7 +3351,7 @@ static CURLcode ftp_nb_type(struct connectdata *conn, state(conn, newstate); /* keep track of our current transfer type */ ftpc->transfertype = (char)want; ftpc->transfertype = want; return CURLE_OK; } Loading lib/http.c +17 −17 Original line number Diff line number Diff line Loading @@ -384,14 +384,14 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) */ static CURLcode Curl_http_output_auth(struct connectdata *conn, char *request, char *path, const char *request, const char *path, bool proxytunnel) /* TRUE if this is the request setting up the proxy tunnel */ { CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; char *auth=NULL; const char *auth=NULL; struct auth *authhost; struct auth *authproxy; Loading Loading @@ -426,7 +426,7 @@ Curl_http_output_auth(struct connectdata *conn, (conn->bits.tunnel_proxy == proxytunnel)) { #ifdef USE_NTLM if(authproxy->picked == CURLAUTH_NTLM) { auth=(char *)"NTLM"; auth="NTLM"; result = Curl_output_ntlm(conn, TRUE); if(result) return result; Loading @@ -437,7 +437,7 @@ Curl_http_output_auth(struct connectdata *conn, /* Basic */ if(conn->bits.proxy_user_passwd && !checkheaders(data, "Proxy-authorization:")) { auth=(char *)"Basic"; auth="Basic"; result = Curl_output_basic(conn, TRUE); if(result) return result; Loading @@ -448,11 +448,11 @@ Curl_http_output_auth(struct connectdata *conn, } #ifndef CURL_DISABLE_CRYPTO_AUTH else if(authproxy->picked == CURLAUTH_DIGEST) { auth=(char *)"Digest"; auth="Digest"; result = Curl_output_digest(conn, TRUE, /* proxy */ (unsigned char *)request, (unsigned char *)path); (const unsigned char *)request, (const unsigned char *)path); if(result) return result; } Loading Loading @@ -485,7 +485,7 @@ Curl_http_output_auth(struct connectdata *conn, if((authhost->picked == CURLAUTH_GSSNEGOTIATE) && data->state.negotiate.context && !GSS_ERROR(data->state.negotiate.status)) { auth=(char *)"GSS-Negotiate"; auth="GSS-Negotiate"; result = Curl_output_negotiate(conn); if (result) return result; Loading @@ -495,7 +495,7 @@ Curl_http_output_auth(struct connectdata *conn, #endif #ifdef USE_NTLM if(authhost->picked == CURLAUTH_NTLM) { auth=(char *)"NTLM"; auth="NTLM"; result = Curl_output_ntlm(conn, FALSE); if(result) return result; Loading @@ -505,11 +505,11 @@ Curl_http_output_auth(struct connectdata *conn, { #ifndef CURL_DISABLE_CRYPTO_AUTH if(authhost->picked == CURLAUTH_DIGEST) { auth=(char *)"Digest"; auth="Digest"; result = Curl_output_digest(conn, FALSE, /* not a proxy */ (unsigned char *)request, (unsigned char *)path); (const unsigned char *)request, (const unsigned char *)path); if(result) return result; } else Loading @@ -517,7 +517,7 @@ Curl_http_output_auth(struct connectdata *conn, if(authhost->picked == CURLAUTH_BASIC) { if(conn->bits.user_passwd && !checkheaders(data, "Authorization:")) { auth=(char *)"Basic"; auth="Basic"; result = Curl_output_basic(conn, FALSE); if(result) return result; Loading Loading @@ -551,7 +551,7 @@ Curl_http_output_auth(struct connectdata *conn, CURLcode Curl_http_input_auth(struct connectdata *conn, int httpcode, char *header) /* the first non-space */ const char *header) /* the first non-space */ { /* * This resource requires authentication Loading @@ -559,7 +559,7 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, struct SessionHandle *data = conn->data; long *availp; char *start; const char *start; struct auth *authp; if (httpcode == 407) { Loading Loading @@ -1118,7 +1118,7 @@ Curl_compareheader(const char *headerline, /* line to check */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, int sockindex, char *hostname, const char *hostname, unsigned short remote_port) { int subversion=0; Loading lib/http.h +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ bool Curl_compareheader(const char *headerline, /* line to check */ /* ftp can use this as well */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, int tunnelsocket, char *hostname, unsigned short remote_port); const char *hostname, unsigned short remote_port); /* protocol-specific functions set up to be called by the main engine */ CURLcode Curl_http(struct connectdata *conn, bool *done); Loading @@ -50,7 +50,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap, /* These functions are in http.c */ void Curl_http_auth_stage(struct SessionHandle *data, int stage); CURLcode Curl_http_input_auth(struct connectdata *conn, int httpcode, char *header); int httpcode, const char *header); CURLcode Curl_http_auth_act(struct connectdata *conn); int Curl_http_should_fail(struct connectdata *conn); Loading lib/http_digest.c +4 −4 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ Proxy-Authenticate: Digest realm="testrealm", nonce="1053604598" CURLdigest Curl_input_digest(struct connectdata *conn, bool proxy, char *header) /* rest of the *-authenticate: const char *header) /* rest of the *-authenticate: header */ { bool more = TRUE; Loading Loading @@ -212,8 +212,8 @@ static void md5_to_ascii(unsigned char *source, /* 16 bytes */ CURLcode Curl_output_digest(struct connectdata *conn, bool proxy, unsigned char *request, unsigned char *uripath) const unsigned char *request, const unsigned char *uripath) { /* We have a Digest setup for this, use it! Now, to get all the details for this sorted out, I must urge you dear friend to read up on the RFC2617 Loading Loading
lib/formdata.c +9 −9 Original line number Diff line number Diff line Loading @@ -481,7 +481,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, return_value = CURL_FORMADD_OPTION_TWICE; else current_form->namelength = array_state?(long)array_value:(long)va_arg(params, long); array_state?(size_t)array_value:(size_t)va_arg(params, long); break; /* Loading @@ -506,7 +506,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, return_value = CURL_FORMADD_OPTION_TWICE; else current_form->contentslength = array_state?(long)array_value:va_arg(params, long); array_state?(size_t)array_value:(size_t)va_arg(params, long); break; /* Get contents from a given file name */ Loading @@ -514,7 +514,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, if (current_form->flags != 0) return_value = CURL_FORMADD_OPTION_TWICE; else { char *filename = array_state? const char *filename = array_state? array_value:va_arg(params, char *); if (filename) { current_form->value = strdup(filename); Loading @@ -533,7 +533,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, /* We upload a file */ case CURLFORM_FILE: { char *filename = array_state?array_value: const char *filename = array_state?array_value: va_arg(params, char *); if (current_form->value) { Loading Loading @@ -567,7 +567,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, case CURLFORM_BUFFER: { char *filename = array_state?array_value: const char *filename = array_state?array_value: va_arg(params, char *); if (current_form->value) { Loading Loading @@ -615,12 +615,12 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, return_value = CURL_FORMADD_OPTION_TWICE; else current_form->bufferlength = array_state?(long)array_value:va_arg(params, long); array_state?(size_t)array_value:(size_t)va_arg(params, long); break; case CURLFORM_CONTENTTYPE: { char *contenttype = const char *contenttype = array_state?array_value:va_arg(params, char *); if (current_form->contenttype) { if (current_form->flags & HTTPPOST_FILENAME) { Loading Loading @@ -666,7 +666,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, } case CURLFORM_FILENAME: { char *filename = array_state?array_value: const char *filename = array_state?array_value: va_arg(params, char *); if( current_form->showfilename ) return_value = CURL_FORMADD_OPTION_TWICE; Loading Loading @@ -1055,7 +1055,7 @@ static char *basename(char *path) } #endif static char *strippath(char *fullfile) static char *strippath(const char *fullfile) { char *filename; char *base; Loading
lib/ftp.c +4 −4 Original line number Diff line number Diff line Loading @@ -374,7 +374,7 @@ static CURLcode ftp_readresp(curl_socket_t sockfd, /* we got a whole chunk of data, which can be anything from one * byte to a set of lines and possible just a piece of the last * line */ int i; ssize_t i; data->reqdata.keep.headerbytecount += gotbytes; Loading Loading @@ -661,7 +661,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ /* we got a whole chunk of data, which can be anything from one * byte to a set of lines and possible just a piece of the last * line */ int i; ssize_t i; data->reqdata.keep.headerbytecount += gotbytes; Loading Loading @@ -3340,7 +3340,7 @@ static CURLcode ftp_nb_type(struct connectdata *conn, { struct ftp_conn *ftpc = &conn->proto.ftpc; CURLcode result; int want = ascii?'A':'I'; char want = ascii?'A':'I'; if (ftpc->transfertype == want) { state(conn, newstate); Loading @@ -3351,7 +3351,7 @@ static CURLcode ftp_nb_type(struct connectdata *conn, state(conn, newstate); /* keep track of our current transfer type */ ftpc->transfertype = (char)want; ftpc->transfertype = want; return CURLE_OK; } Loading
lib/http.c +17 −17 Original line number Diff line number Diff line Loading @@ -384,14 +384,14 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) */ static CURLcode Curl_http_output_auth(struct connectdata *conn, char *request, char *path, const char *request, const char *path, bool proxytunnel) /* TRUE if this is the request setting up the proxy tunnel */ { CURLcode result = CURLE_OK; struct SessionHandle *data = conn->data; char *auth=NULL; const char *auth=NULL; struct auth *authhost; struct auth *authproxy; Loading Loading @@ -426,7 +426,7 @@ Curl_http_output_auth(struct connectdata *conn, (conn->bits.tunnel_proxy == proxytunnel)) { #ifdef USE_NTLM if(authproxy->picked == CURLAUTH_NTLM) { auth=(char *)"NTLM"; auth="NTLM"; result = Curl_output_ntlm(conn, TRUE); if(result) return result; Loading @@ -437,7 +437,7 @@ Curl_http_output_auth(struct connectdata *conn, /* Basic */ if(conn->bits.proxy_user_passwd && !checkheaders(data, "Proxy-authorization:")) { auth=(char *)"Basic"; auth="Basic"; result = Curl_output_basic(conn, TRUE); if(result) return result; Loading @@ -448,11 +448,11 @@ Curl_http_output_auth(struct connectdata *conn, } #ifndef CURL_DISABLE_CRYPTO_AUTH else if(authproxy->picked == CURLAUTH_DIGEST) { auth=(char *)"Digest"; auth="Digest"; result = Curl_output_digest(conn, TRUE, /* proxy */ (unsigned char *)request, (unsigned char *)path); (const unsigned char *)request, (const unsigned char *)path); if(result) return result; } Loading Loading @@ -485,7 +485,7 @@ Curl_http_output_auth(struct connectdata *conn, if((authhost->picked == CURLAUTH_GSSNEGOTIATE) && data->state.negotiate.context && !GSS_ERROR(data->state.negotiate.status)) { auth=(char *)"GSS-Negotiate"; auth="GSS-Negotiate"; result = Curl_output_negotiate(conn); if (result) return result; Loading @@ -495,7 +495,7 @@ Curl_http_output_auth(struct connectdata *conn, #endif #ifdef USE_NTLM if(authhost->picked == CURLAUTH_NTLM) { auth=(char *)"NTLM"; auth="NTLM"; result = Curl_output_ntlm(conn, FALSE); if(result) return result; Loading @@ -505,11 +505,11 @@ Curl_http_output_auth(struct connectdata *conn, { #ifndef CURL_DISABLE_CRYPTO_AUTH if(authhost->picked == CURLAUTH_DIGEST) { auth=(char *)"Digest"; auth="Digest"; result = Curl_output_digest(conn, FALSE, /* not a proxy */ (unsigned char *)request, (unsigned char *)path); (const unsigned char *)request, (const unsigned char *)path); if(result) return result; } else Loading @@ -517,7 +517,7 @@ Curl_http_output_auth(struct connectdata *conn, if(authhost->picked == CURLAUTH_BASIC) { if(conn->bits.user_passwd && !checkheaders(data, "Authorization:")) { auth=(char *)"Basic"; auth="Basic"; result = Curl_output_basic(conn, FALSE); if(result) return result; Loading Loading @@ -551,7 +551,7 @@ Curl_http_output_auth(struct connectdata *conn, CURLcode Curl_http_input_auth(struct connectdata *conn, int httpcode, char *header) /* the first non-space */ const char *header) /* the first non-space */ { /* * This resource requires authentication Loading @@ -559,7 +559,7 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, struct SessionHandle *data = conn->data; long *availp; char *start; const char *start; struct auth *authp; if (httpcode == 407) { Loading Loading @@ -1118,7 +1118,7 @@ Curl_compareheader(const char *headerline, /* line to check */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, int sockindex, char *hostname, const char *hostname, unsigned short remote_port) { int subversion=0; Loading
lib/http.h +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ bool Curl_compareheader(const char *headerline, /* line to check */ /* ftp can use this as well */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, int tunnelsocket, char *hostname, unsigned short remote_port); const char *hostname, unsigned short remote_port); /* protocol-specific functions set up to be called by the main engine */ CURLcode Curl_http(struct connectdata *conn, bool *done); Loading @@ -50,7 +50,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, char *datap, /* These functions are in http.c */ void Curl_http_auth_stage(struct SessionHandle *data, int stage); CURLcode Curl_http_input_auth(struct connectdata *conn, int httpcode, char *header); int httpcode, const char *header); CURLcode Curl_http_auth_act(struct connectdata *conn); int Curl_http_should_fail(struct connectdata *conn); Loading
lib/http_digest.c +4 −4 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ Proxy-Authenticate: Digest realm="testrealm", nonce="1053604598" CURLdigest Curl_input_digest(struct connectdata *conn, bool proxy, char *header) /* rest of the *-authenticate: const char *header) /* rest of the *-authenticate: header */ { bool more = TRUE; Loading Loading @@ -212,8 +212,8 @@ static void md5_to_ascii(unsigned char *source, /* 16 bytes */ CURLcode Curl_output_digest(struct connectdata *conn, bool proxy, unsigned char *request, unsigned char *uripath) const unsigned char *request, const unsigned char *uripath) { /* We have a Digest setup for this, use it! Now, to get all the details for this sorted out, I must urge you dear friend to read up on the RFC2617 Loading