diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-05-22 22:45:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-05-22 22:45:38 +0000 |
commit | 01108e3a632c5fdb6a789d0c82375fd24ebf7474 (patch) | |
tree | 6a5b0decb700af5070c2015406cd7bad56c7205e /lib | |
parent | 8026b1e194d779609374019ff943f05bf4c77d79 (diff) |
warning-free is better
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/http.c b/lib/http.c index 44ef29e8f..0d2996c03 100644 --- a/lib/http.c +++ b/lib/http.c @@ -628,7 +628,7 @@ CURLcode Curl_http(struct connectdata *conn) char *host = conn->name; const char *te = ""; /* tranfer-encoding */ char *ptr; - unsigned char *request; + char *request; if(!conn->proto.http) { /* Only allocate this struct if we don't already have it! */ @@ -650,11 +650,12 @@ CURLcode Curl_http(struct connectdata *conn) data->set.httpreq = HTTPREQ_PUT; } - request = data->set.customrequest?data->set.customrequest: - (data->set.no_body?"HEAD": + request = data->set.customrequest? + data->set.customrequest: + (data->set.no_body?(char *)"HEAD": ((HTTPREQ_POST == data->set.httpreq) || - (HTTPREQ_POST_FORM == data->set.httpreq))?"POST": - (HTTPREQ_PUT == data->set.httpreq)?"PUT":"GET"); + (HTTPREQ_POST_FORM == data->set.httpreq))?(char *)"POST": + (HTTPREQ_PUT == data->set.httpreq)?(char *)"PUT":(char *)"GET"); /* The User-Agent string has been built in url.c already, because it might have been used in the proxy connect, but if we have got a header with @@ -666,7 +667,9 @@ CURLcode Curl_http(struct connectdata *conn) } if(data->state.digest.nonce) { - result = Curl_output_digest(conn, request, (unsigned char *)ppath); + result = Curl_output_digest(conn, + (unsigned char *)request, + (unsigned char *)ppath); if(result) return result; } |