Lines Matching refs:data
121 struct Curl_easy *data)
130 data->req.ignorebody = FALSE;
138 CURL_TRC_CF(data, cf, "[%d] new tunnel state 'init'", ts->stream_id);
143 CURL_TRC_CF(data, cf, "[%d] new tunnel state 'connect'", ts->stream_id);
148 CURL_TRC_CF(data, cf, "[%d] new tunnel state 'response'", ts->stream_id);
153 CURL_TRC_CF(data, cf, "[%d] new tunnel state 'established'",
155 infof(data, "CONNECT phase completed");
156 data->state.authproxy.done = TRUE;
157 data->state.authproxy.multipass = FALSE;
161 CURL_TRC_CF(data, cf, "[%d] new tunnel state 'failed'", ts->stream_id);
166 Curl_safefree(data->state.aptr.proxyuserpwd);
215 struct Curl_easy *data,
224 if(data->state.select_bits != bits) {
225 CURL_TRC_CF(data, cf, "[%d] DRAIN select_bits=%x",
227 data->state.select_bits = bits;
228 Curl_expire(data, 0, EXPIRE_RUN_NOW);
240 struct Curl_easy *data = CF_DATA_CURRENT(cf);
241 nread = Curl_conn_cf_recv(cf->next, data, (char *)buf, buflen, err);
242 CURL_TRC_CF(data, cf, "[0] nw_in_reader(len=%zu) -> %zd, %d",
259 struct Curl_easy *data = CF_DATA_CURRENT(cf);
260 nwritten = Curl_conn_cf_send(cf->next, data, (const char *)buf, buflen,
262 CURL_TRC_CF(data, cf, "[0] nw_out_writer(len=%zu) -> %zd, %d",
321 struct Curl_easy *data)
339 failf(data, "Couldn't initialize nghttp2 callbacks");
359 failf(data, "Couldn't initialize nghttp2");
367 iv[0].value = Curl_multi_max_concurrent_streams(data->multi);
374 failf(data, "nghttp2_submit_settings() failed: %s(%d)",
384 failf(data, "nghttp2_session_set_local_window_size() failed: %s(%d)",
397 CURL_TRC_CF(data, cf, "[0] init proxy ctx -> %d", result);
408 struct Curl_easy *data)
414 (void)data;
422 CURL_TRC_CF(data, cf, "[0] flush nw send buffer(%zu) -> EAGAIN",
428 CURL_TRC_CF(data, cf, "[0] nw send buffer flushed");
438 struct Curl_easy *data,
449 CURL_TRC_CF(data, cf, "[0] %zu bytes to nghttp2 -> %zd", blen, rv);
451 failf(data,
459 CURL_TRC_CF(data, cf, "[0] all data in connection buffer processed");
463 CURL_TRC_CF(data, cf, "[0] process_pending_input: %zu bytes left "
472 struct Curl_easy *data)
480 CURL_TRC_CF(data, cf, "[0] process %zu bytes in connection buffer",
482 if(proxy_h2_process_pending_input(cf, data, &result) < 0)
486 /* Receive data from the "lower" filters, e.g. network until
487 * it is time to stop or we have enough data for this stream */
494 CURL_TRC_CF(data, cf, "[0] read %zu bytes nw data -> %zd, %d",
498 failf(data, "Failed receiving HTTP2 data");
508 if(proxy_h2_process_pending_input(cf, data, &result))
520 struct Curl_easy *data)
530 CURL_TRC_CF(data, cf, "[0] nghttp2_session_send error (%s)%d",
534 return proxy_h2_nw_out_flush(cf, data);
543 struct Curl_easy *data = CF_DATA_CURRENT(cf);
549 DEBUGASSERT(data);
557 failf(data, "Failed sending HTTP2 data");
577 (int)frame->data.padlen);
645 struct Curl_easy *data = CF_DATA_CURRENT(cf);
648 DEBUGASSERT(data);
649 if(data && Curl_trc_cf_is_verbose(cf, data)) {
654 CURL_TRC_CF(data, cf, "[%d] -> %s", frame->hd.stream_id, buffer);
666 struct Curl_easy *data = CF_DATA_CURRENT(cf);
670 DEBUGASSERT(data);
672 if(Curl_trc_cf_is_verbose(cf, data)) {
677 CURL_TRC_CF(data, cf, "[%d] <- %s",frame->hd.stream_id, buffer);
683 DEBUGASSERT(data);
691 if(CURL_WANT_SEND(data)) {
692 drain_tunnel(cf, data, &ctx->tunnel);
705 CURL_TRC_CF(data, cf, "[%d] rcvd FRAME not for tunnel", stream_id);
717 CURL_TRC_CF(data, cf, "[%d] got http status: %d",
726 if(CURL_WANT_SEND(data)) {
727 drain_tunnel(cf, data, &ctx->tunnel);
745 struct Curl_easy *data = CF_DATA_CURRENT(cf);
750 (void)data;
754 CURL_TRC_CF(data, cf, "[%d] header for non-tunnel stream: "
784 CURL_TRC_CF(data, cf, "[%d] status: HTTP/2 %03d",
798 CURL_TRC_CF(data, cf, "[%d] header: %.*s: %.*s",
813 struct Curl_easy *data = CF_DATA_CURRENT(cf);
819 (void)data;
839 CURL_TRC_CF(data, cf, "[%d] tunnel_send_callback -> %zd",
876 struct Curl_easy *data = CF_DATA_CURRENT(cf);
879 (void)data;
884 CURL_TRC_CF(data, cf, "[%d] proxy_h2_on_stream_close, %s (err %d)",
894 struct Curl_easy *data,
910 result = Curl_http_req_to_h2(&h2_headers, req, data);
934 failf(data, "nghttp2_session_upgrade2() failed: %s(%d)",
949 struct Curl_easy *data,
956 result = Curl_http_proxy_create_CONNECT(&req, cf, data, 2);
960 infof(data, "Establish HTTP/2 proxy tunnel to %s", req->authority);
962 result = proxy_h2_submit(&ts->stream_id, cf, data, ctx->h2, req,
965 CURL_TRC_CF(data, cf, "[%d] send, nghttp2_submit_request error: %s",
973 failf(data, "Failed sending CONNECT to proxy");
978 struct Curl_easy *data,
987 infof(data, "CONNECT tunnel established, response %d", ts->resp->status);
988 h2_tunnel_go_state(cf, ts, H2_TUNNEL_ESTABLISHED, data);
1000 CURL_TRC_CF(data, cf, "[0] CONNECT: fwd auth header '%s'",
1002 result = Curl_http_input_auth(data, ts->resp->status == 407,
1006 if(data->req.newurl) {
1008 Curl_safefree(data->req.newurl);
1009 h2_tunnel_go_state(cf, ts, H2_TUNNEL_INIT, data);
1019 struct Curl_easy *data,
1031 CURL_TRC_CF(data, cf, "[0] CONNECT start for %s", ts->authority);
1032 result = submit_CONNECT(cf, data, ts);
1035 h2_tunnel_go_state(cf, ts, H2_TUNNEL_CONNECT, data);
1040 result = proxy_h2_progress_ingress(cf, data);
1042 result = proxy_h2_progress_egress(cf, data);
1044 h2_tunnel_go_state(cf, ts, H2_TUNNEL_FAILED, data);
1049 h2_tunnel_go_state(cf, ts, H2_TUNNEL_RESPONSE, data);
1059 result = inspect_response(cf, data, ts);
1078 h2_tunnel_go_state(cf, ts, H2_TUNNEL_FAILED, data);
1083 struct Curl_easy *data,
1099 result = Curl_conn_cf_connect(cf->next, data, blocking, done);
1106 CF_DATA_SAVE(save, cf, data);
1108 result = cf_h2_proxy_ctx_init(cf, data);
1114 check = Curl_timeleft(data, NULL, TRUE);
1116 failf(data, "Proxy CONNECT aborted due to timeout");
1124 result = H2_CONNECT(cf, data, ts);
1133 static void cf_h2_proxy_close(struct Curl_cfilter *cf, struct Curl_easy *data)
1140 CF_DATA_SAVE(save, cf, data);
1145 cf->next->cft->do_close(cf->next, data);
1149 struct Curl_easy *data)
1153 (void)data;
1161 const struct Curl_easy *data)
1168 return cf->next? cf->next->cft->has_data_pending(cf->next, data) : FALSE;
1172 struct Curl_easy *data,
1176 curl_socket_t sock = Curl_conn_cf_get_socket(cf, data);
1179 Curl_pollset_check(data, ps, sock, &want_recv, &want_send);
1184 CF_DATA_SAVE(save, cf, data);
1193 Curl_pollset_set(data, ps, sock, want_recv, want_send);
1199 struct Curl_easy *data,
1206 CURL_TRC_CF(data, cf, "[%d] REFUSED_STREAM, try again on a new "
1213 failf(data, "HTTP/2 stream %u was not closed cleanly: %s (err %u)",
1220 failf(data, "HTTP/2 stream %u was reset", ctx->tunnel.stream_id);
1227 CURL_TRC_CF(data, cf, "[%d] handle_tunnel_close -> %zd, %d",
1232 static ssize_t tunnel_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
1249 nread = h2_handle_tunnel_close(cf, data, err);
1264 CURL_TRC_CF(data, cf, "[%d] tunnel_recv(len=%zu) -> %zd, %d",
1270 struct Curl_easy *data,
1282 CF_DATA_SAVE(save, cf, data);
1285 *err = proxy_h2_progress_ingress(cf, data);
1290 nread = tunnel_recv(cf, data, buf, len, err);
1293 CURL_TRC_CF(data, cf, "[%d] increase window by %zd",
1298 result = proxy_h2_progress_egress(cf, data);
1300 /* pending data to send, need to be called again. Ideally, we'd
1304 CURL_TRC_CF(data, cf, "[%d] egress blocked, DRAIN",
1306 drain_tunnel(cf, data, &ctx->tunnel);
1316 /* data pending and no fatal error to report. Need to trigger
1318 drain_tunnel(cf, data, &ctx->tunnel);
1320 CURL_TRC_CF(data, cf, "[%d] cf_recv(len=%zu) -> %zd %d",
1327 struct Curl_easy *data,
1341 CF_DATA_SAVE(save, cf, data);
1349 /* the data in `buf` has already been submitted or added to the
1355 failf(data, "HTTP/2 proxy, send again with decreased length");
1374 /* req body data is buffered, resume the potentially suspended stream */
1383 result = proxy_h2_progress_ingress(cf, data);
1390 /* Call the nghttp2 send loop and flush to write ALL buffered data,
1392 result = proxy_h2_progress_egress(cf, data);
1403 * there is data left in our stream send buffer unwritten. This may
1409 /* Unable to send all data, due to connection blocked or H2 window
1419 * We *could* iterate over all data on this conn maybe? */
1420 CURL_TRC_CF(data, cf, "[%d] remote flow "
1428 CURL_TRC_CF(data, cf, "[%d] cf_send(len=%zu) BLOCK: win %u/%zu "
1433 drain_tunnel(cf, data, &ctx->tunnel);
1446 CURL_TRC_CF(data, cf, "[0] send: nothing to do in this session");
1455 /* data pending and no fatal error to report. Need to trigger
1457 drain_tunnel(cf, data, &ctx->tunnel);
1459 CURL_TRC_CF(data, cf, "[%d] cf_send(len=%zu) -> %zd, %d, "
1472 struct Curl_easy *data,
1479 if(!cf->next || !cf->next->cft->is_alive(cf->next, data, input_pending))
1484 not in use by any other transfer, there shouldn't be any data here,
1492 if(proxy_h2_process_pending_input(cf, data, &result) < 0)
1509 struct Curl_easy *data,
1516 CF_DATA_SAVE(save, cf, data);
1517 result = (ctx && ctx->h2 && proxy_h2_connisalive(cf, data, input_pending));
1518 CURL_TRC_CF(data, cf, "[0] conn alive -> %d, input_pending=%d",
1543 struct Curl_easy *data)
1549 (void)data;