From: Fabian Keil Date: Thu, 27 Nov 2008 09:44:04 +0000 (+0000) Subject: Cosmetics for the last commit: Don't watch out for X-Git-Tag: v_3_0_11~147 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=ea85a89f2ddc101be7b9ce75f06c0c2ddeea82d3 Cosmetics for the last commit: Don't watch out for the last chunk if the content isn't chunk-encoded or if we already determined the content length previously. --- diff --git a/jcc.c b/jcc.c index 41039220..b7dd69a3 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.207 2008/11/25 17:25:16 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.208 2008/11/26 18:24:17 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,11 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.207 2008/11/25 17:25:16 fabiankeil Exp $" * * Revisions : * $Log: jcc.c,v $ + * Revision 1.208 2008/11/26 18:24:17 fabiankeil + * Recognize that the server response is complete if the + * last chunk is read together with the server headers. + * Reported by Lee. + * * Revision 1.207 2008/11/25 17:25:16 fabiankeil * Don't convert the client-header list to text until we need to. * @@ -2667,7 +2672,9 @@ static void chat(struct client_state *csp) FD_SET(csp->sfd, &rfds); #ifdef FEATURE_CONNECTION_KEEP_ALIVE - if (((csp->iob->eod - csp->iob->cur) >= 5) + if ((csp->flags & CSP_FLAG_CHUNKED) + && !(csp->flags & CSP_FLAG_CONTENT_LENGTH_SET) + && ((csp->iob->eod - csp->iob->cur) >= 5) && !memcmp(csp->iob->eod-5, "0\r\n\r\n", 5)) { log_error(LOG_LEVEL_CONNECT,