aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-02-12 21:13:47 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-02-12 21:13:47 +0000
commit28b932fb4ef14b8b9ebda6823c98fbedad6be4b2 (patch)
tree3398b7e7ae05437ee9e29168212ec6c215d299c3 /src
parenta63174114193addcc147d8de8e71b66568e77639 (diff)
- 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.
Diffstat (limited to 'src')
-rw-r--r--src/main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index e35050025..d0b885151 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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();