mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
the stuff formerly done in Curl_http_close is now done in Curl_close
This commit is contained in:
parent
437fd064c9
commit
146413a53c
10
lib/url.c
10
lib/url.c
@ -153,17 +153,21 @@ CURLcode Curl_close(struct SessionHandle *data)
|
||||
Curl_SSL_Close_All(data);
|
||||
#endif
|
||||
|
||||
if(data->state.auth_host)
|
||||
free(data->state.auth_host);
|
||||
|
||||
if(data->change.proxy_alloc)
|
||||
free(data->change.proxy);
|
||||
|
||||
if(data->change.referer_alloc)
|
||||
free(data->change.referer);
|
||||
|
||||
if(data->change.url_alloc)
|
||||
free(data->change.url);
|
||||
|
||||
if(data->state.headerbuff)
|
||||
free(data->state.headerbuff);
|
||||
|
||||
|
||||
if(data->set.cookiejar)
|
||||
/* we have a "destination" for all the cookies to get dumped to */
|
||||
Curl_cookie_output(data->cookies, data->set.cookiejar);
|
||||
@ -1762,7 +1766,6 @@ static CURLcode Connect(struct SessionHandle *data,
|
||||
conn->protocol |= PROT_HTTP;
|
||||
conn->curl_do = Curl_http;
|
||||
conn->curl_done = Curl_http_done;
|
||||
conn->curl_close = Curl_http_close;
|
||||
}
|
||||
else if (strequal(conn->protostr, "HTTPS")) {
|
||||
#ifdef USE_SSLEAY
|
||||
@ -1775,7 +1778,6 @@ static CURLcode Connect(struct SessionHandle *data,
|
||||
conn->curl_do = Curl_http;
|
||||
conn->curl_done = Curl_http_done;
|
||||
conn->curl_connect = Curl_http_connect;
|
||||
conn->curl_close = Curl_http_close;
|
||||
|
||||
#else /* USE_SSLEAY */
|
||||
failf(data, LIBCURL_NAME
|
||||
@ -1795,7 +1797,6 @@ static CURLcode Connect(struct SessionHandle *data,
|
||||
conn->protocol |= PROT_GOPHER;
|
||||
conn->curl_do = Curl_http;
|
||||
conn->curl_done = Curl_http_done;
|
||||
conn->curl_close = Curl_http_close;
|
||||
}
|
||||
else if(strequal(conn->protostr, "FTP") ||
|
||||
strequal(conn->protostr, "FTPS")) {
|
||||
@ -1827,7 +1828,6 @@ static CURLcode Connect(struct SessionHandle *data,
|
||||
}
|
||||
conn->curl_do = Curl_http;
|
||||
conn->curl_done = Curl_http_done;
|
||||
conn->curl_close = Curl_http_close;
|
||||
}
|
||||
else {
|
||||
conn->curl_do = Curl_ftp;
|
||||
|
Loading…
Reference in New Issue
Block a user