mirror of
https://github.com/curl/curl.git
synced 2025-10-01 00:16:48 +03:00
- Brock Noland reported that curl behaved differently depending on which order
you used -i and -I.
This commit is contained in:
parent
84eb9fee76
commit
ead2618c31
5
CHANGES
5
CHANGES
|
@ -6,6 +6,11 @@
|
||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
|
||||||
|
Daniel Stenberg (14 Apr 2008)
|
||||||
|
- Brock Noland reported that curl behaved differently depending on which order
|
||||||
|
you used -i and -I.
|
||||||
|
|
||||||
Daniel Stenberg (12 Apr 2008)
|
Daniel Stenberg (12 Apr 2008)
|
||||||
- Andre Guibert de Bruet found and fixed a case where malloc() was called but
|
- Andre Guibert de Bruet found and fixed a case where malloc() was called but
|
||||||
was not checked for a NULL return, in the Negotiate code.
|
was not checked for a NULL return, in the Negotiate code.
|
||||||
|
|
|
@ -20,6 +20,7 @@ This release includes the following bugfixes:
|
||||||
o curl_easy_reset() resets the max redirect limit properly
|
o curl_easy_reset() resets the max redirect limit properly
|
||||||
o configure now correctly recognizes Heimdal and MIT gssapi libraries
|
o configure now correctly recognizes Heimdal and MIT gssapi libraries
|
||||||
o malloc() failure check in Negotiate
|
o malloc() failure check in Negotiate
|
||||||
|
o -i and -I together now work the same no matter what order they're used
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
|
@ -37,6 +38,6 @@ This release would not have looked like this without help, code, reports and
|
||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
Michal Marek, Daniel Fandrich, Scott Barrett, Alexey Simak, Daniel Black,
|
Michal Marek, Daniel Fandrich, Scott Barrett, Alexey Simak, Daniel Black,
|
||||||
Rafa Muyo, Andre Guibert de Bruet
|
Rafa Muyo, Andre Guibert de Bruet, Brock Noland
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
|
32
src/main.c
32
src/main.c
|
@ -200,7 +200,9 @@ typedef enum {
|
||||||
#define CONF_AUTO_REFERER (1<<4) /* the automatic referer-system please! */
|
#define CONF_AUTO_REFERER (1<<4) /* the automatic referer-system please! */
|
||||||
#define CONF_HEADER (1<<8) /* throw the header out too */
|
#define CONF_HEADER (1<<8) /* throw the header out too */
|
||||||
#define CONF_NOPROGRESS (1<<10) /* shut off the progress meter */
|
#define CONF_NOPROGRESS (1<<10) /* shut off the progress meter */
|
||||||
#define CONF_NOBODY (1<<11) /* use HEAD to get http document */
|
#define CONF_NOBODY (1<<11) /* get meta-data (headers) about the file
|
||||||
|
without transferring the body, use HEAD to
|
||||||
|
get http document */
|
||||||
#define CONF_FAILONERROR (1<<12) /* no output on http error codes >= 300 */
|
#define CONF_FAILONERROR (1<<12) /* no output on http error codes >= 300 */
|
||||||
#define CONF_DIRLISTONLY (1<<16) /* request nonverbose directory listing */
|
#define CONF_DIRLISTONLY (1<<16) /* request nonverbose directory listing */
|
||||||
#define CONF_FTPAPPEND (1<<20) /* Append instead of overwrite on upload! */
|
#define CONF_FTPAPPEND (1<<20) /* Append instead of overwrite on upload! */
|
||||||
|
@ -2452,22 +2454,13 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
||||||
break;
|
break;
|
||||||
case 'I':
|
case 'I':
|
||||||
/*
|
/*
|
||||||
* This is a bit tricky. We either SET both bits, or we clear both
|
* CONF_BODY will imply CONF_HEADER later on
|
||||||
* bits. Let's not make any other outcomes from this.
|
|
||||||
*/
|
*/
|
||||||
if((CONF_HEADER|CONF_NOBODY) !=
|
config->conf ^= CONF_NOBODY;
|
||||||
(config->conf&(CONF_HEADER|CONF_NOBODY)) ) {
|
if(SetHTTPrequest(config,
|
||||||
/* one of them weren't set, set both */
|
(config->conf & CONF_NOBODY)?HTTPREQ_HEAD:HTTPREQ_GET,
|
||||||
config->conf |= (CONF_HEADER|CONF_NOBODY);
|
&config->httpreq))
|
||||||
if(SetHTTPrequest(config, HTTPREQ_HEAD, &config->httpreq))
|
|
||||||
return PARAM_BAD_USE;
|
return PARAM_BAD_USE;
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* both were set, clear both */
|
|
||||||
config->conf &= ~(CONF_HEADER|CONF_NOBODY);
|
|
||||||
if(SetHTTPrequest(config, HTTPREQ_GET, &config->httpreq))
|
|
||||||
return PARAM_BAD_USE;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'k': /* allow insecure SSL connects */
|
case 'k': /* allow insecure SSL connects */
|
||||||
config->insecure_ok ^= TRUE;
|
config->insecure_ok ^= TRUE;
|
||||||
|
@ -4411,9 +4404,14 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
||||||
my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
|
my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
|
||||||
my_setopt(curl, CURLOPT_URL, url); /* what to fetch */
|
my_setopt(curl, CURLOPT_URL, url); /* what to fetch */
|
||||||
my_setopt(curl, CURLOPT_PROXY, config->proxy); /* proxy to use */
|
my_setopt(curl, CURLOPT_PROXY, config->proxy); /* proxy to use */
|
||||||
my_setopt(curl, CURLOPT_HEADER, config->conf&CONF_HEADER);
|
|
||||||
my_setopt(curl, CURLOPT_NOPROGRESS, config->conf&CONF_NOPROGRESS);
|
my_setopt(curl, CURLOPT_NOPROGRESS, config->conf&CONF_NOPROGRESS);
|
||||||
my_setopt(curl, CURLOPT_NOBODY, config->conf&CONF_NOBODY);
|
if(config->conf&CONF_NOBODY) {
|
||||||
|
my_setopt(curl, CURLOPT_NOBODY, 1);
|
||||||
|
my_setopt(curl, CURLOPT_HEADER, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
my_setopt(curl, CURLOPT_HEADER, config->conf&CONF_HEADER);
|
||||||
|
|
||||||
my_setopt(curl, CURLOPT_FAILONERROR,
|
my_setopt(curl, CURLOPT_FAILONERROR,
|
||||||
config->conf&CONF_FAILONERROR);
|
config->conf&CONF_FAILONERROR);
|
||||||
my_setopt(curl, CURLOPT_UPLOAD, uploadfile?TRUE:FALSE);
|
my_setopt(curl, CURLOPT_UPLOAD, uploadfile?TRUE:FALSE);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user