Unverified Commit a0f9670e authored by Lyman Epp's avatar Lyman Epp Committed by Daniel Stenberg
Browse files

Curl_init_do: handle NULL connection pointer passed in

Closes #2653
parent bb9a340c
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -4711,16 +4711,18 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn)
{
  struct SingleRequest *k = &data->req;

  if(conn) {
    conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to
                                   use */

  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;
  }

  data->state.done = FALSE; /* *_done() is not called yet */
  data->state.expect100header = FALSE;


  if(data->set.opt_no_body)
    /* in HTTP lingo, no body means using the HEAD request... */