Lines Matching defs:state

185   if(data->state.referer_alloc) {
186 Curl_safefree(data->state.referer);
187 data->state.referer_alloc = FALSE;
189 data->state.referer = NULL;
190 if(data->state.url_alloc) {
191 Curl_safefree(data->state.url);
192 data->state.url_alloc = FALSE;
194 data->state.url = NULL;
199 curl_slist_free_all(data->state.cookielist);
200 data->state.cookielist = NULL;
207 struct urlpieces *up = &data->state.up;
216 curl_url_cleanup(data->state.uh);
217 data->state.uh = NULL;
242 if(!data->state.internal) {
260 if(data->state.rangestringalloc)
261 free(data->state.range);
268 Curl_safefree(data->state.first_host);
269 Curl_safefree(data->state.scratch);
276 if(data->state.referer_alloc) {
277 Curl_safefree(data->state.referer);
278 data->state.referer_alloc = FALSE;
280 data->state.referer = NULL;
283 Curl_safefree(data->state.buffer);
284 Curl_dyn_free(&data->state.headerb);
285 Curl_safefree(data->state.ulbuf);
293 curl_slist_free_all(data->state.hstslist); /* clean up list */
303 Curl_resolver_cleanup(data->state.async.resolver);
314 Curl_safefree(data->state.aptr.proxyuserpwd);
315 Curl_safefree(data->state.aptr.uagent);
316 Curl_safefree(data->state.aptr.userpwd);
317 Curl_safefree(data->state.aptr.accept_encoding);
318 Curl_safefree(data->state.aptr.te);
319 Curl_safefree(data->state.aptr.rangeline);
320 Curl_safefree(data->state.aptr.ref);
321 Curl_safefree(data->state.aptr.host);
322 Curl_safefree(data->state.aptr.cookiehost);
323 Curl_safefree(data->state.aptr.rtsp_transport);
324 Curl_safefree(data->state.aptr.user);
325 Curl_safefree(data->state.aptr.passwd);
326 Curl_safefree(data->state.aptr.proxyuser);
327 Curl_safefree(data->state.aptr.proxypasswd);
339 Curl_mime_cleanpart(data->state.formp);
340 Curl_safefree(data->state.formp);
523 result = Curl_resolver_init(data, &data->state.async.resolver);
532 Curl_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER);
536 data->state.lastconnect_id = -1;
537 data->state.recent_conn_id = -1;
542 data->state.current_speed = -1; /* init to negative == impossible */
546 Curl_resolver_cleanup(data->state.async.resolver);
547 Curl_dyn_free(&data->state.headerb);
620 * This function MUST NOT reset state in the Curl_easy struct if that
699 (handle->state.httpwant >= CURL_HTTP_VERSION_2))
798 /* The protocol has a special method for checking the state of the
800 unsigned int state;
806 state = conn->handler->connection_check(data, conn, CONNCHECK_ISDEAD);
807 dead = (state & CONNRESULT_DEAD);
818 /* For reuse, we want a "clean" connection state. The includes
876 Curl_timediff(now, data->state.conn_cache->last_cleanup);
883 while(Curl_conncache_foreach(data, data->state.conn_cache, &prune,
894 data->state.conn_cache->last_cleanup = now;
917 * return back to 'idle' (unused) state.
935 bool wantNTLMhttp = ((data->state.authhost.want &
940 ((data->state.authproxy.want &
948 bool h2upgrade = (data->state.httpwant == CURL_HTTP_VERSION_2_0) &&
957 bundle = Curl_conncache_find_bundle(data, needle, data->state.conn_cache);
1163 (data->state.httpwant < CURL_HTTP_VERSION_2_0))
1165 (data->state.httpwant < CURL_HTTP_VERSION_3))))
1397 (data->state.aptr.proxyuser) ? TRUE : FALSE;
1679 if(data->state.this_is_a_follow &&
1696 data->state.this_is_a_follow ? " (in redirect)":"");
1780 bool use_set_uh = (data->set.uh && !data->state.this_is_a_follow);
1786 uh = data->state.uh = curl_url_dup(data->set.uh);
1789 uh = data->state.uh = curl_url();
1796 !Curl_is_absolute_url(data->state.url, NULL, 0, TRUE)) {
1798 data->state.url);
1801 if(data->state.url_alloc)
1802 free(data->state.url);
1803 data->state.url = url;
1804 data->state.url_alloc = TRUE;
1809 uc = curl_url_set(uh, CURLUPART_URL, data->state.url,
1824 if(data->state.url_alloc)
1825 free(data->state.url);
1826 data->state.url = newurl;
1827 data->state.url_alloc = TRUE;
1830 uc = curl_url_get(uh, CURLUPART_SCHEME, &data->state.up.scheme, 0);
1834 uc = curl_url_get(uh, CURLUPART_HOST, &data->state.up.hostname, 0);
1836 if(!strcasecompare("file", data->state.up.scheme))
1839 else if(strlen(data->state.up.hostname) > MAX_URL_LEN) {
1843 hostname = data->state.up.hostname;
1873 if(data->hsts && strcasecompare("http", data->state.up.scheme)) {
1877 Curl_safefree(data->state.up.scheme);
1881 if(data->state.url_alloc)
1882 Curl_safefree(data->state.url);
1887 uc = curl_url_get(uh, CURLUPART_SCHEME, &data->state.up.scheme, 0);
1892 data->state.url = url;
1893 data->state.url_alloc = TRUE;
1895 data->state.url);
1900 result = findprotocol(data, conn, data->state.up.scheme);
1909 uc = curl_url_get(uh, CURLUPART_PASSWORD, &data->state.up.password, 0);
1912 result = Curl_urldecode(data->state.up.password, 0, &decoded, NULL,
1918 result = Curl_setstropt(&data->state.aptr.passwd, decoded);
1930 uc = curl_url_get(uh, CURLUPART_USER, &data->state.up.user, 0);
1933 result = Curl_urldecode(data->state.up.user, 0, &decoded, NULL,
1939 result = Curl_setstropt(&data->state.aptr.user, decoded);
1943 else if(data->state.aptr.passwd) {
1945 result = Curl_setstropt(&data->state.aptr.user, "");
1951 uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
1954 conn->options = strdup(data->state.up.options);
1961 uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path,
1966 uc = curl_url_get(uh, CURLUPART_PORT, &data->state.up.port,
1969 if(!strcasecompare("file", data->state.up.scheme))
1973 unsigned long port = strtoul(data->state.up.port, NULL, 10);
1975 (data->set.use_port && data->state.allow_port) ?
1979 (void)curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
1997 struct UrlState *s = &data->state;
2277 result = Curl_setstropt(&data->state.aptr.proxyuser, proxyuser);
2290 result = Curl_setstropt(&data->state.aptr.proxypasswd, proxypasswd);
2385 const char *proxyuser = data->state.aptr.proxyuser ?
2386 data->state.aptr.proxyuser : "";
2387 const char *proxypasswd = data->state.aptr.proxypasswd ?
2388 data->state.aptr.proxypasswd : "";
2392 result = Curl_setstropt(&data->state.aptr.proxyuser,
2398 result = Curl_setstropt(&data->state.aptr.proxypasswd,
2710 if(data->set.use_port && data->state.allow_port) {
2716 uc = curl_url_set(data->state.uh, CURLUPART_PORT, portbuf, 0);
2753 if(data->state.aptr.user) {
2755 userp = &data->state.aptr.user;
2796 if(data->state.aptr.user != *userp) {
2798 result = Curl_setstropt(&data->state.aptr.user, *userp);
2803 if(data->state.aptr.user) {
2804 uc = curl_url_set(data->state.uh, CURLUPART_USER, data->state.aptr.user,
2809 *userp = strdup(data->state.aptr.user);
2815 CURLcode result = Curl_setstropt(&data->state.aptr.passwd, *passwdp);
2819 if(data->state.aptr.passwd) {
2820 uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD,
2821 data->state.aptr.passwd, CURLU_URLENCODE);
2825 *passwdp = strdup(data->state.aptr.passwd);
2845 if((conn->handler->flags & PROTOPT_NEEDSPWD) && !data->state.aptr.user)
3436 if(!data->state.url) {
3650 if((data->set.reuse_fresh && !data->state.followlocation) ||
3696 Curl_conncache_find_bundle(data, conn, data->state.conn_cache);
3762 assume the state is fine as this is a fresh connection and NTLM is
3764 if((data->state.authhost.picked & (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
3765 data->state.authhost.done) {
3767 data->state.authhost.picked = CURLAUTH_NONE;
3768 data->state.authhost.done = FALSE;
3771 if((data->state.authproxy.picked & (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
3772 data->state.authproxy.done) {
3774 data->state.authproxy.picked = CURLAUTH_NONE;
3775 data->state.authproxy.done = FALSE;
3843 data->state.crlf_conversions = 0; /* reset CRLF conversion counter */
3924 if(data->state.wildcardmatch &&
3926 data->state.wildcardmatch = FALSE;
3929 data->state.done = FALSE; /* *_done() is not called yet */
3930 data->state.expect100header = FALSE;
3934 data->state.httpreq = HTTPREQ_HEAD;
4043 memset(&data->state.priority, 0, sizeof(data->state.priority));