Lines Matching refs:state

185   if(data->state.referer_alloc) {  in Curl_freeset()
186 Curl_safefree(data->state.referer); in Curl_freeset()
187 data->state.referer_alloc = FALSE; in Curl_freeset()
189 data->state.referer = NULL; in Curl_freeset()
190 if(data->state.url_alloc) { in Curl_freeset()
191 Curl_safefree(data->state.url); in Curl_freeset()
192 data->state.url_alloc = FALSE; in Curl_freeset()
194 data->state.url = NULL; in Curl_freeset()
199 curl_slist_free_all(data->state.cookielist); in Curl_freeset()
200 data->state.cookielist = NULL; in Curl_freeset()
207 struct urlpieces *up = &data->state.up; in up_free()
216 curl_url_cleanup(data->state.uh); in up_free()
217 data->state.uh = NULL; in up_free()
240 if(!data->state.internal) { in Curl_close()
260 if(data->state.rangestringalloc) in Curl_close()
261 free(data->state.range); in Curl_close()
268 Curl_safefree(data->state.first_host); in Curl_close()
271 if(data->state.referer_alloc) { in Curl_close()
272 Curl_safefree(data->state.referer); in Curl_close()
273 data->state.referer_alloc = FALSE; in Curl_close()
275 data->state.referer = NULL; in Curl_close()
278 Curl_dyn_free(&data->state.headerb); in Curl_close()
288 curl_slist_free_all(data->state.hstslist); /* clean up list */ in Curl_close()
298 Curl_resolver_cleanup(data->state.async.resolver); in Curl_close()
310 Curl_safefree(data->state.aptr.proxyuserpwd); in Curl_close()
312 Curl_safefree(data->state.aptr.uagent); in Curl_close()
313 Curl_safefree(data->state.aptr.userpwd); in Curl_close()
314 Curl_safefree(data->state.aptr.accept_encoding); in Curl_close()
315 Curl_safefree(data->state.aptr.te); in Curl_close()
316 Curl_safefree(data->state.aptr.rangeline); in Curl_close()
317 Curl_safefree(data->state.aptr.ref); in Curl_close()
318 Curl_safefree(data->state.aptr.host); in Curl_close()
320 Curl_safefree(data->state.aptr.cookiehost); in Curl_close()
323 Curl_safefree(data->state.aptr.rtsp_transport); in Curl_close()
325 Curl_safefree(data->state.aptr.user); in Curl_close()
326 Curl_safefree(data->state.aptr.passwd); in Curl_close()
328 Curl_safefree(data->state.aptr.proxyuser); in Curl_close()
329 Curl_safefree(data->state.aptr.proxypasswd); in Curl_close()
333 Curl_mime_cleanpart(data->state.formp); in Curl_close()
334 Curl_safefree(data->state.formp); in Curl_close()
341 Curl_netrc_cleanup(&data->state.netrc); in Curl_close()
521 result = Curl_resolver_init(data, &data->state.async.resolver); in Curl_open()
531 Curl_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER); in Curl_open()
535 data->state.lastconnect_id = -1; in Curl_open()
536 data->state.recent_conn_id = -1; in Curl_open()
545 data->state.current_speed = -1; /* init to negative == impossible */ in Curl_open()
547 Curl_llist_init(&data->state.httphdrs, NULL); in Curl_open()
549 Curl_netrc_init(&data->state.netrc); in Curl_open()
553 Curl_resolver_cleanup(data->state.async.resolver); in Curl_open()
554 Curl_dyn_free(&data->state.headerb); in Curl_open()
667 (data->state.httpwant >= CURL_HTTP_VERSION_2)) in xfer_may_multiplex()
769 unsigned int state; in Curl_conn_seems_dead() local
775 state = conn->handler->connection_check(data, conn, CONNCHECK_ISDEAD); in Curl_conn_seems_dead()
776 dead = (state & CONNRESULT_DEAD); in Curl_conn_seems_dead()
1005 (data->state.httpwant == CURL_HTTP_VERSION_2_0) && in url_match_conn()
1040 (data->state.httpwant != CURL_HTTP_VERSION_2TLS)) { in url_match_conn()
1042 (data->state.httpwant < CURL_HTTP_VERSION_2_0)) { in url_match_conn()
1048 (data->state.httpwant < CURL_HTTP_VERSION_3)) { in url_match_conn()
1254 match.want_ntlm_http = ((data->state.authhost.want & CURLAUTH_NTLM) && in ConnectionExists()
1259 (data->state.authproxy.want & CURLAUTH_NTLM) && in ConnectionExists()
1358 conn->bits.proxy_user_passwd = !!data->state.aptr.proxyuser; in allocate_conn()
1634 if(data->state.this_is_a_follow && in findprotocol()
1651 data->state.this_is_a_follow ? " (in redirect)":""); in findprotocol()
1735 bool use_set_uh = (data->set.uh && !data->state.this_is_a_follow);
1741 uh = data->state.uh = curl_url_dup(data->set.uh);
1744 uh = data->state.uh = curl_url();
1751 !Curl_is_absolute_url(data->state.url, NULL, 0, TRUE)) {
1753 data->state.url);
1756 if(data->state.url_alloc)
1757 free(data->state.url);
1758 data->state.url = url;
1759 data->state.url_alloc = TRUE;
1764 uc = curl_url_set(uh, CURLUPART_URL, data->state.url, (unsigned int)
1779 if(data->state.url_alloc)
1780 free(data->state.url);
1781 data->state.url = newurl;
1782 data->state.url_alloc = TRUE;
1785 uc = curl_url_get(uh, CURLUPART_SCHEME, &data->state.up.scheme, 0);
1789 uc = curl_url_get(uh, CURLUPART_HOST, &data->state.up.hostname, 0);
1791 if(!strcasecompare("file", data->state.up.scheme))
1794 else if(strlen(data->state.up.hostname) > MAX_URL_LEN) {
1798 hostname = data->state.up.hostname;
1828 if(data->hsts && strcasecompare("http", data->state.up.scheme)) {
1832 Curl_safefree(data->state.up.scheme);
1836 if(data->state.url_alloc)
1837 Curl_safefree(data->state.url);
1842 uc = curl_url_get(uh, CURLUPART_SCHEME, &data->state.up.scheme, 0);
1847 data->state.url = url;
1848 data->state.url_alloc = TRUE;
1850 data->state.url);
1855 result = findprotocol(data, conn, data->state.up.scheme);
1863 if(!data->state.aptr.passwd || (data->state.creds_from != CREDS_OPTION)) {
1864 uc = curl_url_get(uh, CURLUPART_PASSWORD, &data->state.up.password, 0);
1867 result = Curl_urldecode(data->state.up.password, 0, &decoded, NULL,
1873 result = Curl_setstropt(&data->state.aptr.passwd, decoded);
1876 data->state.creds_from = CREDS_URL;
1882 if(!data->state.aptr.user || (data->state.creds_from != CREDS_OPTION)) {
1886 uc = curl_url_get(uh, CURLUPART_USER, &data->state.up.user, 0);
1889 result = Curl_urldecode(data->state.up.user, 0, &decoded, NULL,
1895 result = Curl_setstropt(&data->state.aptr.user, decoded);
1896 data->state.creds_from = CREDS_URL;
1904 uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
1907 conn->options = strdup(data->state.up.options);
1914 uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path,
1919 uc = curl_url_get(uh, CURLUPART_PORT, &data->state.up.port,
1922 if(!strcasecompare("file", data->state.up.scheme))
1926 unsigned long port = strtoul(data->state.up.port, NULL, 10);
1928 (data->set.use_port && data->state.allow_port) ?
1932 (void)curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
1950 struct UrlState *s = &data->state;
2235 result = Curl_setstropt(&data->state.aptr.proxyuser, proxyuser);
2248 result = Curl_setstropt(&data->state.aptr.proxypasswd, proxypasswd);
2344 const char *proxyuser = data->state.aptr.proxyuser ?
2345 data->state.aptr.proxyuser : "";
2346 const char *proxypasswd = data->state.aptr.proxypasswd ?
2347 data->state.aptr.proxypasswd : "";
2640 if(data->set.use_port && data->state.allow_port) {
2646 uc = curl_url_set(data->state.uh, CURLUPART_PORT, portbuf, 0);
2694 if(data->state.aptr.user &&
2695 (data->state.creds_from != CREDS_NETRC)) {
2698 userp = &data->state.aptr.user;
2703 ret = Curl_parsenetrc(&data->state.netrc, conn->host.name,
2749 if(data->state.aptr.user != *userp) {
2751 result = Curl_setstropt(&data->state.aptr.user, *userp);
2754 data->state.creds_from = CREDS_NETRC;
2757 if(data->state.aptr.user) {
2758 uc = curl_url_set(data->state.uh, CURLUPART_USER, data->state.aptr.user,
2763 *userp = strdup(data->state.aptr.user);
2769 CURLcode result = Curl_setstropt(&data->state.aptr.passwd, *passwdp);
2772 data->state.creds_from = CREDS_NETRC;
2774 if(data->state.aptr.passwd) {
2775 uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD,
2776 data->state.aptr.passwd, CURLU_URLENCODE);
2780 *passwdp = strdup(data->state.aptr.passwd);
2800 if((conn->handler->flags & PROTOPT_NEEDSPWD) && !data->state.aptr.user)
3075 switch(data->state.httpwant) {
3373 if(!data->state.url) {
3590 if((data->set.reuse_fresh && !data->state.followlocation) ||
3685 if((data->state.authhost.picked & CURLAUTH_NTLM) &&
3686 data->state.authhost.done) {
3688 data->state.authhost.picked = CURLAUTH_NONE;
3689 data->state.authhost.done = FALSE;
3692 if((data->state.authproxy.picked & CURLAUTH_NTLM) &&
3693 data->state.authproxy.done) {
3695 data->state.authproxy.picked = CURLAUTH_NONE;
3696 data->state.authproxy.done = FALSE;
3840 if(data->state.wildcardmatch &&
3842 data->state.wildcardmatch = FALSE;
3845 data->state.done = FALSE; /* *_done() is not called yet */
3849 data->state.httpreq = HTTPREQ_HEAD;
3954 memset(&data->state.priority, 0, sizeof(data->state.priority));