diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-02-12 21:13:47 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-02-12 21:13:47 +0000 |
commit | 28b932fb4ef14b8b9ebda6823c98fbedad6be4b2 (patch) | |
tree | 3398b7e7ae05437ee9e29168212ec6c215d299c3 /lib/http_chunks.c | |
parent | a63174114193addcc147d8de8e71b66568e77639 (diff) | |
download | curl-28b932fb4ef14b8b9ebda6823c98fbedad6be4b2.tar.gz |
- 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 'lib/http_chunks.c')
-rw-r--r-- | lib/http_chunks.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/http_chunks.c b/lib/http_chunks.c index 1b03a5569..36bee789c 100644 --- a/lib/http_chunks.c +++ b/lib/http_chunks.c @@ -116,6 +116,12 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, *wrote = 0; /* nothing's written yet */ + /* the original data is written to the client, but we go on with the + chunk read process, to properly calculate the content length*/ + if ( data->set.http_te_skip ) + Curl_client_write(conn, CLIENTWRITE_BODY, datap,datalen); + + while(length) { switch(ch->state) { case CHUNK_HEX: @@ -206,12 +212,17 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, /* Write the data portion available */ #ifdef HAVE_LIBZ - switch (data->reqdata.keep.content_encoding) { + switch (conn->data->set.http_ce_skip? + IDENTITY : data->reqdata.keep.content_encoding) { case IDENTITY: #endif - if(!k->ignorebody) - result = Curl_client_write(conn, CLIENTWRITE_BODY, datap, - piece); + if(!k->ignorebody) { + if ( !data->set.http_te_skip ) + result = Curl_client_write(conn, CLIENTWRITE_BODY, datap, + piece); + else + result = CURLE_OK; + } #ifdef HAVE_LIBZ break; @@ -334,6 +345,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn, return(CHUNKE_BAD_CHUNK); } #endif /* CURL_DOES_CONVERSIONS */ + if ( !data->set.http_te_skip ) Curl_client_write(conn, CLIENTWRITE_HEADER, conn->trailer, conn->trlPos); } |