cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] chunked encoding and ignore body

From: Shmulik Regev <shmulbox_at_gmail.com>
Date: Tue, 10 Jul 2007 09:55:27 +0300

The tiny patch below fixes a bug (that I introduced :) which happens
when negotiating authentication with a proxy (probably with web
servers as well) that uses chunked transfer encoding for the 407 error
pages. In this case the ''ignorebody'' flag was ignored (no pun
intended).

Cheers,
Shmul

Index: http_chunks.c
===================================================================
--- http_chunks.c (revision 1659)
+++ http_chunks.c (revision 1719)
@@ -118,7 +118,7 @@

   /* 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 )
+ if ( data->set.http_te_skip && !k->ignorebody )
     Curl_client_write(conn, CLIENTWRITE_BODY, datap,datalen);
Received on 2007-07-10