diff options
author | monnerat <pm@datasphere.ch> | 2010-04-19 11:17:46 +0200 |
---|---|---|
committer | monnerat <pm@datasphere.ch> | 2010-04-19 11:17:46 +0200 |
commit | 87fbcb4494dc942e38396e71a3c9c633d779a8f1 (patch) | |
tree | 94faaf04a76802292534bbab0713a8706703d081 /lib/http.c | |
parent | 4bfe07640c93f8dfd3af4bb76c8346ef4a129cc8 (diff) | |
parent | 5d93525f30e8b2a422644b4ec09a82ebf04283cd (diff) |
Merge branch 'master' of github.com:bagder/curl
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/lib/http.c b/lib/http.c index 7ffc34d49..cfc09cd5e 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1817,9 +1817,9 @@ static CURLcode https_connecting(struct connectdata *conn, bool *done) } #endif -#ifdef USE_SSLEAY -/* This function is OpenSSL-specific. It should be made to query the generic - SSL layer instead. */ +#if defined(USE_SSLEAY) || defined(USE_GNUTLS) +/* This function is for OpenSSL and GnuTLS only. It should be made to query + the generic SSL layer instead. */ static int https_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks) @@ -1844,17 +1844,6 @@ static int https_getsock(struct connectdata *conn, return CURLE_OK; } #else -#ifdef USE_GNUTLS -static int https_getsock(struct connectdata *conn, - curl_socket_t *socks, - int numsocks) -{ - (void)conn; - (void)socks; - (void)numsocks; - return GETSOCK_BLANK; -} -#else #ifdef USE_NSS static int https_getsock(struct connectdata *conn, curl_socket_t *socks, @@ -1879,7 +1868,6 @@ static int https_getsock(struct connectdata *conn, #endif #endif #endif -#endif /* * Curl_http_done() gets called from Curl_done() after a single HTTP request @@ -2665,14 +2653,13 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) return result; result = Curl_add_buffer_send(req_buffer, conn, - &data->info.request_size, 0, FIRSTSOCKET); + &data->info.request_size, 0, FIRSTSOCKET); if(result) failf(data, "Failed sending POST request"); else /* setup variables for the upcoming transfer */ - result = Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, - -1, NULL); + Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, &http->readbytecount, + -1, NULL); break; } @@ -2740,10 +2727,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) failf(data, "Failed sending POST request"); else /* setup variables for the upcoming transfer */ - result = Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, - FIRSTSOCKET, - &http->writebytecount); + Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, + &http->readbytecount, FIRSTSOCKET, + &http->writebytecount); if(result) { Curl_formclean(&http->sendit); /* free that whole lot */ @@ -2793,10 +2779,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) failf(data, "Failed sending PUT request"); else /* prepare for transfer */ - result = Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, - postsize?FIRSTSOCKET:-1, - postsize?&http->writebytecount:NULL); + Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, + &http->readbytecount, postsize?FIRSTSOCKET:-1, + postsize?&http->writebytecount:NULL); if(result) return result; break; @@ -2943,11 +2928,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(result) failf(data, "Failed sending HTTP POST request"); else - result = - Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, - http->postdata?FIRSTSOCKET:-1, - http->postdata?&http->writebytecount:NULL); + Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, + &http->readbytecount, http->postdata?FIRSTSOCKET:-1, + http->postdata?&http->writebytecount:NULL); break; default: @@ -2963,10 +2946,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) failf(data, "Failed sending HTTP request"); else /* HTTP GET/HEAD download: */ - result = Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, - &http->readbytecount, - http->postdata?FIRSTSOCKET:-1, - http->postdata?&http->writebytecount:NULL); + Curl_setup_transfer(conn, FIRSTSOCKET, -1, TRUE, &http->readbytecount, + http->postdata?FIRSTSOCKET:-1, + http->postdata?&http->writebytecount:NULL); } if(result) return result; |