diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-06-02 10:34:27 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-06-24 23:44:42 +0200 |
commit | e9f0dd43bcbeb47e72e4f9d18c86d8e4b0b19739 (patch) | |
tree | 2c776bd994160b5facec8656dc1a308cffb9c721 /lib/url.c | |
parent | f65ab8864e2f9d580daf0ca48c972d6124a2ff3d (diff) |
http2: init the pushed transfer properly
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -142,7 +142,6 @@ find_oldest_idle_connection_in_bundle(struct SessionHandle *data, struct connectbundle *bundle); static void conn_free(struct connectdata *conn); static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke); -static CURLcode do_init(struct connectdata *conn); static CURLcode parse_url_login(struct SessionHandle *data, struct connectdata *conn, char **userptr, char **passwdptr, @@ -5651,7 +5650,7 @@ static CURLcode create_conn(struct SessionHandle *data, } /* since we skip do_init() */ - do_init(conn); + Curl_init_do(data, conn); goto out; } @@ -5830,7 +5829,7 @@ static CURLcode create_conn(struct SessionHandle *data, conn->inuse = TRUE; /* Setup and init stuff before DO starts, in preparing for the transfer. */ - do_init(conn); + Curl_init_do(data, conn); /* * Setup whatever necessary for a resumed transfer @@ -6112,20 +6111,24 @@ CURLcode Curl_done(struct connectdata **connp, } /* - * do_init() inits the readwrite session. This is inited each time (in the DO - * function before the protocol-specific DO functions are invoked) for a - * transfer, sometimes multiple times on the same SessionHandle. Make sure + * Curl_init_do() inits the readwrite session. This is inited each time (in + * the DO function before the protocol-specific DO functions are invoked) for + * a transfer, sometimes multiple times on the same SessionHandle. Make sure * nothing in here depends on stuff that are setup dynamically for the * transfer. + * + * Allow this function to get called with 'conn' set to NULL. */ -static CURLcode do_init(struct connectdata *conn) +CURLcode Curl_init_do(struct SessionHandle *data, struct connectdata *conn) { - struct SessionHandle *data = conn->data; 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; /* Curl_done() is not called yet */ - conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to use */ data->state.expect100header = FALSE; if(data->set.opt_no_body) |