1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

Curl_init_do: handle NULL connection pointer passed in

Closes #2653
This commit is contained in:
Lyman Epp 2018-06-12 17:17:30 -05:00 committed by Daniel Stenberg
parent bb9a340c73
commit a0f9670ec9
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -4711,16 +4711,18 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn)
{
struct SingleRequest *k = &data->req;
conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to
use */
if(conn) {
conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to
use */
/* if the protocol used doesn't support wildcards, switch it off */
if(data->state.wildcardmatch &&
!(conn->handler->flags & PROTOPT_WILDCARD))
data->state.wildcardmatch = FALSE;
}
data->state.done = FALSE; /* *_done() is not called yet */
data->state.expect100header = FALSE;
/* if the protocol used doesn't support wildcards, switch it off */
if(data->state.wildcardmatch &&
!(conn->handler->flags & PROTOPT_WILDCARD))
data->state.wildcardmatch = FALSE;
if(data->set.opt_no_body)
/* in HTTP lingo, no body means using the HEAD request... */