-const char jcc_rcs[] = "$Id: jcc.c,v 1.206 2008/11/23 17:00:11 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.207 2008/11/25 17:25:16 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*
* Revisions :
* $Log: jcc.c,v $
+ * Revision 1.207 2008/11/25 17:25:16 fabiankeil
+ * Don't convert the client-header list to text until we need to.
+ *
* Revision 1.206 2008/11/23 17:00:11 fabiankeil
* Some more chat() cosmetics.
*
FD_SET(csp->sfd, &rfds);
#ifdef FEATURE_CONNECTION_KEEP_ALIVE
+ if (((csp->iob->eod - csp->iob->cur) >= 5)
+ && !memcmp(csp->iob->eod-5, "0\r\n\r\n", 5))
+ {
+ log_error(LOG_LEVEL_CONNECT,
+ "Looks like we read the last chunk together with "
+ "the server headers. We better stop reading.");
+ byte_count = (size_t)(csp->iob->eod - csp->iob->cur);
+ csp->expected_content_length = byte_count;
+ csp->flags |= CSP_FLAG_CONTENT_LENGTH_SET;
+ }
if (server_body && server_response_is_complete(csp, byte_count))
{
log_error(LOG_LEVEL_CONNECT,