- Shmulik Regev fixed so that the final CRLF of HTTP response headers are sent

to the debug callback.

- Shmulik Regev added CURLOPT_HTTP_CONTENT_DECODING and
  CURLOPT_HTTP_TRANSFER_DECODING that if set to zero will disable libcurl's
  internal decoding of content or transfer encoded content. This may be
  preferable in cases where you use libcurl for proxy purposes or similar. The
  command line tool got a --raw option to disable both at once.
This commit is contained in:
Daniel Stenberg 2007-02-12 21:13:47 +00:00
parent a631741141
commit 28b932fb4e
10 changed files with 86 additions and 12 deletions

View file

@ -20,7 +20,6 @@
*
* $Id$
***************************************************************************/
#include "setup.h"
#include <stdio.h>
@ -470,7 +469,7 @@ struct Configurable {
bool disable_sessionid;
char *libcurl; /* output libcurl code to this file name */
bool raw;
struct OutStruct *outs;
};
@ -683,6 +682,7 @@ static void help(void)
" -Q/--quote <cmd> Send command(s) to server before file transfer (F)",
" -r/--range <range> Retrieve a byte range from a HTTP/1.1 or FTP server",
" --random-file <file> File for reading random data from (SSL)",
" --raw Pass HTTP \"raw\", without any transfer decoding (H)",
" -R/--remote-time Set the remote file's time on the local output",
" --retry <num> Retry request <num> times if transient problems occur",
" --retry-delay <seconds> When retrying, wait this many seconds between each",
@ -1473,6 +1473,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
{"$x", "ftp-ssl-control", FALSE},
{"$y", "ftp-ssl-ccc", FALSE},
{"$z", "libcurl", TRUE},
{"$#", "raw", FALSE},
{"0", "http1.0", FALSE},
{"1", "tlsv1", FALSE},
@ -1903,6 +1904,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
case 'z': /* --libcurl */
GetStr(&config->libcurl, nextarg);
break;
case '#': /* --raw */
config->raw ^= TRUE;
break;
}
break;
case '#': /* --progress-bar */
@ -4253,6 +4257,12 @@ operate(struct Configurable *config, int argc, char *argv[])
my_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE,
!config->disable_sessionid);
/* curl 7.16.2 */
if(config->raw) {
my_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, FALSE);
my_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, FALSE);
}
retry_numretries = config->req_retry;
retrystart = curlx_tvnow();