summaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-05-05 15:49:43 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-05-05 15:49:43 +0200
commite34131db783336aa17fa0aa664635867459b2a85 (patch)
treeda9d24dbb53329dade737173e340618a509a8759 /lib/http.c
parent335dfa793c239283b0003d3f10739051c10ecb13 (diff)
downloadcurl-e34131db783336aa17fa0aa664635867459b2a85.tar.gz
SSL: check for SSL, not specific protocols
Code cleanup to check less for protocols and more for the specific relevant feature. Like if SSL is required.
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/http.c b/lib/http.c
index f6b6a3e14..5759a7ff2 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1013,7 +1013,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
return res;
}
- if(conn->handler->protocol & CURLPROTO_HTTPS) {
+ if(conn->handler->flags & PROTOPT_SSL) {
/* We never send more than CURL_MAX_WRITE_SIZE bytes in one single chunk
when we speak HTTPS, as if only a fraction of it is sent now, this data
needs to fit into the normal read-callback buffer later on and that
@@ -1292,7 +1292,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
}
#endif /* CURL_DISABLE_PROXY */
- if(conn->given->protocol & CURLPROTO_HTTPS) {
+ if(conn->given->flags & PROTOPT_SSL) {
/* perform SSL initialization */
if(data->state.used_interface == Curl_if_multi) {
result = https_connecting(conn, done);
@@ -1331,7 +1331,7 @@ static int http_getsock_do(struct connectdata *conn,
static CURLcode https_connecting(struct connectdata *conn, bool *done)
{
CURLcode result;
- DEBUGASSERT((conn) && (conn->handler->protocol & CURLPROTO_HTTPS));
+ DEBUGASSERT((conn) && (conn->handler->flags & PROTOPT_SSL));
/* perform SSL initialization for this socket */
result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done);
@@ -1349,7 +1349,7 @@ static int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
{
- if(conn->handler->protocol & CURLPROTO_HTTPS) {
+ if(conn->handler->flags & PROTOPT_SSL) {
struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];
if(!numsocks)