moved the followlocation field from the http struct to the urldata struct
since it has to survive http struct deletion
This commit is contained in:
Родитель
336124c3dc
Коммит
2bd70e1351
|
@ -646,7 +646,7 @@ CURLcode curl_transfer(CURL *curl)
|
||||||
/* mark the next request as a followed location: */
|
/* mark the next request as a followed location: */
|
||||||
data->bits.this_is_a_follow = TRUE;
|
data->bits.this_is_a_follow = TRUE;
|
||||||
|
|
||||||
data->proto.http->followlocation++; /* count location-followers */
|
data->followlocation++; /* count location-followers */
|
||||||
|
|
||||||
if(data->bits.http_auto_referer) {
|
if(data->bits.http_auto_referer) {
|
||||||
/* We are asked to automatically set the previous URL as the
|
/* We are asked to automatically set the previous URL as the
|
||||||
|
|
|
@ -272,8 +272,6 @@ struct HTTP {
|
||||||
struct Form form;
|
struct Form form;
|
||||||
size_t (*storefread)(char *, size_t , size_t , FILE *);
|
size_t (*storefread)(char *, size_t , size_t , FILE *);
|
||||||
FILE *in;
|
FILE *in;
|
||||||
|
|
||||||
long followlocation;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -412,17 +410,23 @@ struct UrlData {
|
||||||
char *userpwd; /* <user:password>, if used */
|
char *userpwd; /* <user:password>, if used */
|
||||||
char *range; /* range, if used. See README for detailed specification on
|
char *range; /* range, if used. See README for detailed specification on
|
||||||
this syntax. */
|
this syntax. */
|
||||||
|
|
||||||
|
/* stuff related to HTTP */
|
||||||
|
|
||||||
|
long followlocation;
|
||||||
|
char *referer;
|
||||||
|
bool free_referer; /* set TRUE if 'referer' points to a string we
|
||||||
|
allocated */
|
||||||
|
char *useragent; /* User-Agent string */
|
||||||
char *postfields; /* if POST, set the fields' values here */
|
char *postfields; /* if POST, set the fields' values here */
|
||||||
long postfieldsize; /* if POST, this might have a size to use instead of
|
long postfieldsize; /* if POST, this might have a size to use instead of
|
||||||
strlen(), and then the data *may* be binary (contain
|
strlen(), and then the data *may* be binary (contain
|
||||||
zero bytes) */
|
zero bytes) */
|
||||||
|
|
||||||
bool free_referer; /* set TRUE if 'referer' points to a string we
|
/* stuff related to FTP */
|
||||||
allocated */
|
|
||||||
char *referer;
|
|
||||||
char *useragent; /* User-Agent string */
|
|
||||||
|
|
||||||
char *ftpport; /* port to send with the PORT command */
|
char *ftpport; /* port to send with the PORT command */
|
||||||
|
|
||||||
|
/* general things */
|
||||||
char *device; /* Interface to use */
|
char *device; /* Interface to use */
|
||||||
|
|
||||||
/* function that stores the output:*/
|
/* function that stores the output:*/
|
||||||
|
|
Загрузка…
Ссылка в новой задаче