aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-04-30 21:20:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-04-30 21:20:08 +0000
commit852989856d3802a9e7bd2f1e368302d92ddf66e2 (patch)
treec26ddf2fbf798b3939f0867bff7b90dfdcde0148 /lib/urldata.h
parent7dfdbf8fbebab9af95e19c5ff8af3073218e4a4f (diff)
- 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.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index ce6287190..fa93a6454 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -760,8 +760,10 @@ struct SingleRequest {
bool ignorecl; /* This HTTP response has no body so we ignore the Content-
Length: header */
- char *newurl; /* This can only be set if a Location: was in the
- document headers */
+ char *location; /* This points to an allocated version of the Location:
+ header data */
+ char *newurl; /* Set to the new URL to use when a redirect or a retry is
+ wanted */
/* 'upload_present' is used to keep a byte counter of how much data there is
still left in the buffer, aimed for upload. */
@@ -1021,21 +1023,19 @@ struct connectdata {
*/
struct PureInfo {
int httpcode; /* Recent HTTP or FTP response code */
- int httpproxycode;
- int httpversion;
+ int httpproxycode; /* response code from proxy when received separate */
+ int httpversion; /* the http version number X.Y = X*10+Y */
long filetime; /* If requested, this is might get set. Set to -1 if the time
was unretrievable. We cannot have this of type time_t,
since time_t is unsigned on several platforms such as
OpenVMS. */
long header_size; /* size of read header(s) in bytes */
long request_size; /* the amount of bytes sent in the request(s) */
-
- long proxyauthavail;
- long httpauthavail;
-
+ long proxyauthavail; /* what proxy auth types were announced */
+ long httpauthavail; /* what host auth types were announced */
long numconnects; /* how many new connection did libcurl created */
-
char *contenttype; /* the content type of the object */
+ char *wouldredirect; /* URL this would've been redirected to if asked to */
};