Lines Matching refs:cf
55 CURLcode Curl_http_proxy_get_destination(struct Curl_cfilter *cf, in Curl_http_proxy_get_destination() argument
59 DEBUGASSERT(cf); in Curl_http_proxy_get_destination()
60 DEBUGASSERT(cf->conn); in Curl_http_proxy_get_destination()
62 if(cf->conn->bits.conn_to_host) in Curl_http_proxy_get_destination()
63 *phostname = cf->conn->conn_to_host.name; in Curl_http_proxy_get_destination()
64 else if(cf->sockindex == SECONDARYSOCKET) in Curl_http_proxy_get_destination()
65 *phostname = cf->conn->secondaryhostname; in Curl_http_proxy_get_destination()
67 *phostname = cf->conn->host.name; in Curl_http_proxy_get_destination()
69 if(cf->sockindex == SECONDARYSOCKET) in Curl_http_proxy_get_destination()
70 *pport = cf->conn->secondary_port; in Curl_http_proxy_get_destination()
71 else if(cf->conn->bits.conn_to_port) in Curl_http_proxy_get_destination()
72 *pport = cf->conn->conn_to_port; in Curl_http_proxy_get_destination()
74 *pport = cf->conn->remote_port; in Curl_http_proxy_get_destination()
76 if(*phostname != cf->conn->host.name) in Curl_http_proxy_get_destination()
79 *pipv6_ip = cf->conn->bits.ipv6_ip; in Curl_http_proxy_get_destination()
85 struct Curl_cfilter *cf, in Curl_http_proxy_create_CONNECT() argument
96 result = Curl_http_proxy_get_destination(cf, &hostname, &port, &ipv6_ip); in Curl_http_proxy_create_CONNECT()
114 result = Curl_http_output_auth(data, cf->conn, req->method, HTTPREQ_GET, in Curl_http_proxy_create_CONNECT()
121 !Curl_checkProxyheaders(data, cf->conn, STRCONST("Host"))) { in Curl_http_proxy_create_CONNECT()
134 if(!Curl_checkProxyheaders(data, cf->conn, STRCONST("User-Agent")) && in Curl_http_proxy_create_CONNECT()
143 !Curl_checkProxyheaders(data, cf->conn, STRCONST("Proxy-Connection"))) { in Curl_http_proxy_create_CONNECT()
167 static CURLcode http_proxy_cf_connect(struct Curl_cfilter *cf, in http_proxy_cf_connect() argument
171 struct cf_proxy_ctx *ctx = cf->ctx; in http_proxy_cf_connect()
174 if(cf->connected) { in http_proxy_cf_connect()
179 CURL_TRC_CF(data, cf, "connect"); in http_proxy_cf_connect()
181 result = cf->next->cft->do_connect(cf->next, data, blocking, done); in http_proxy_cf_connect()
188 int alpn = Curl_conn_cf_is_ssl(cf->next) ? in http_proxy_cf_connect()
189 cf->conn->proxy_alpn : CURL_HTTP_VERSION_1_1; in http_proxy_cf_connect()
196 CURL_TRC_CF(data, cf, "installing subfilter for HTTP/1.1"); in http_proxy_cf_connect()
199 result = Curl_cf_h1_proxy_insert_after(cf, data); in http_proxy_cf_connect()
202 cf_protocol = cf->next; in http_proxy_cf_connect()
206 CURL_TRC_CF(data, cf, "installing subfilter for HTTP/2"); in http_proxy_cf_connect()
208 result = Curl_cf_h2_proxy_insert_after(cf, data); in http_proxy_cf_connect()
211 cf_protocol = cf->next; in http_proxy_cf_connect()
236 cf->connected = TRUE; in http_proxy_cf_connect()
242 void Curl_cf_http_proxy_get_host(struct Curl_cfilter *cf, in Curl_cf_http_proxy_get_host() argument
249 if(!cf->connected) { in Curl_cf_http_proxy_get_host()
250 *phost = cf->conn->http_proxy.host.name; in Curl_cf_http_proxy_get_host()
251 *pdisplay_host = cf->conn->http_proxy.host.dispname; in Curl_cf_http_proxy_get_host()
252 *pport = (int)cf->conn->http_proxy.port; in Curl_cf_http_proxy_get_host()
255 cf->next->cft->get_host(cf->next, data, phost, pdisplay_host, pport); in Curl_cf_http_proxy_get_host()
259 static void http_proxy_cf_destroy(struct Curl_cfilter *cf, in http_proxy_cf_destroy() argument
262 struct cf_proxy_ctx *ctx = cf->ctx; in http_proxy_cf_destroy()
265 CURL_TRC_CF(data, cf, "destroy"); in http_proxy_cf_destroy()
269 static void http_proxy_cf_close(struct Curl_cfilter *cf, in http_proxy_cf_close() argument
272 struct cf_proxy_ctx *ctx = cf->ctx; in http_proxy_cf_close()
274 CURL_TRC_CF(data, cf, "close"); in http_proxy_cf_close()
275 cf->connected = FALSE; in http_proxy_cf_close()
280 for(f = cf->next; f; f = f->next) { in http_proxy_cf_close()
283 Curl_conn_cf_discard_sub(cf, ctx->cf_protocol, data, FALSE); in http_proxy_cf_close()
289 if(cf->next) in http_proxy_cf_close()
290 cf->next->cft->do_close(cf->next, data); in http_proxy_cf_close()
316 struct Curl_cfilter *cf; in Curl_cf_http_proxy_insert_after() local
326 result = Curl_cf_create(&cf, &Curl_cft_http_proxy, ctx); in Curl_cf_http_proxy_insert_after()
330 Curl_conn_cf_insert_after(cf_at, cf); in Curl_cf_http_proxy_insert_after()