- To make it easier for applications that want lots of magic stuff done on

redirections and thus cannot use CURLOPT_FOLLOWLOCATION easily, we now
  introduce the new CURLINFO_REDIRECT_URL option that lets applications
  extract the URL libcurl would've redirected to if it had been told to. This
  then enables the application to continue to that URL as it thinks is
  suitable, without having to re-implement the magic of creating the new URL
  from the Location: header etc. Test 1029 verifies it.
This commit is contained in:
Daniel Stenberg
2008-04-30 21:20:08 +00:00
parent 7dfdbf8fbe
commit 852989856d
14 changed files with 218 additions and 66 deletions

View File

@@ -494,6 +494,7 @@ CURLcode Curl_close(struct SessionHandle *data)
Curl_digest_cleanup(data);
Curl_safefree(data->info.contenttype);
Curl_safefree(data->info.wouldredirect);
/* this destroys the channel and we cannot use it anymore after this */
ares_destroy(data->state.areschannel);
@@ -4440,6 +4441,10 @@ CURLcode Curl_done(struct connectdata **connp,
free(data->req.newurl);
data->req.newurl = NULL;
}
if(data->req.location) {
free(data->req.location);
data->req.location = NULL;
}
if(conn->dns_entry) {
Curl_resolv_unlock(data, conn->dns_entry); /* done with this */