http.c: Fixed compilation warnings from features being disabled
warning: unused variable 'data' warning: variable 'addcookies' set but not used ...and some very minor coding style policing.
This commit is contained in:
16
lib/http.c
16
lib/http.c
@@ -556,9 +556,11 @@ output_auth_headers(struct connectdata *conn,
|
|||||||
const char *path,
|
const char *path,
|
||||||
bool proxy)
|
bool proxy)
|
||||||
{
|
{
|
||||||
struct SessionHandle *data = conn->data;
|
const char *auth = NULL;
|
||||||
const char *auth=NULL;
|
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
|
#if defined(USE_SPNEGO) || !defined(CURL_DISABLE_VERBOSE_STRINGS)
|
||||||
|
struct SessionHandle *data = conn->data;
|
||||||
|
#endif
|
||||||
#ifdef USE_SPNEGO
|
#ifdef USE_SPNEGO
|
||||||
struct negotiatedata *negdata = proxy?
|
struct negotiatedata *negdata = proxy?
|
||||||
&data->state.proxyneg:&data->state.negotiate;
|
&data->state.proxyneg:&data->state.negotiate;
|
||||||
@@ -1711,8 +1713,8 @@ CURLcode Curl_add_timecondition(struct SessionHandle *data,
|
|||||||
*/
|
*/
|
||||||
CURLcode Curl_http(struct connectdata *conn, bool *done)
|
CURLcode Curl_http(struct connectdata *conn, bool *done)
|
||||||
{
|
{
|
||||||
struct SessionHandle *data=conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
CURLcode result=CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
struct HTTP *http;
|
struct HTTP *http;
|
||||||
const char *ppath = data->state.path;
|
const char *ppath = data->state.path;
|
||||||
bool paste_ftp_userpwd = FALSE;
|
bool paste_ftp_userpwd = FALSE;
|
||||||
@@ -1722,7 +1724,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
const char *ptr;
|
const char *ptr;
|
||||||
const char *request;
|
const char *request;
|
||||||
Curl_HttpReq httpreq = data->set.httpreq;
|
Curl_HttpReq httpreq = data->set.httpreq;
|
||||||
|
#if !defined(CURL_DISABLE_COOKIES)
|
||||||
char *addcookies = NULL;
|
char *addcookies = NULL;
|
||||||
|
#endif
|
||||||
curl_off_t included_body = 0;
|
curl_off_t included_body = 0;
|
||||||
const char *httpstring;
|
const char *httpstring;
|
||||||
Curl_send_buffer *req_buffer;
|
Curl_send_buffer *req_buffer;
|
||||||
@@ -1736,7 +1740,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
|
|
||||||
if(conn->httpversion < 20) { /* unless the connection is re-used and already
|
if(conn->httpversion < 20) { /* unless the connection is re-used and already
|
||||||
http2 */
|
http2 */
|
||||||
switch (conn->negnpn) {
|
switch(conn->negnpn) {
|
||||||
case NPN_HTTP2:
|
case NPN_HTTP2:
|
||||||
result = Curl_http2_init(conn);
|
result = Curl_http2_init(conn);
|
||||||
if(result)
|
if(result)
|
||||||
@@ -1844,8 +1848,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
else
|
else
|
||||||
conn->allocptr.ref = NULL;
|
conn->allocptr.ref = NULL;
|
||||||
|
|
||||||
|
#if !defined(CURL_DISABLE_COOKIES)
|
||||||
if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(conn, "Cookie:"))
|
if(data->set.str[STRING_COOKIE] && !Curl_checkheaders(conn, "Cookie:"))
|
||||||
addcookies = data->set.str[STRING_COOKIE];
|
addcookies = data->set.str[STRING_COOKIE];
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!Curl_checkheaders(conn, "Accept-Encoding:") &&
|
if(!Curl_checkheaders(conn, "Accept-Encoding:") &&
|
||||||
data->set.str[STRING_ENCODING]) {
|
data->set.str[STRING_ENCODING]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user