-const char parsers_rcs[] = "$Id: parsers.c,v 1.256 2012/10/17 18:19:59 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.260 2012/10/29 12:04:42 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
}
+/*********************************************************************
+ *
+ * Function : clear_iob
+ *
+ * Description : Frees the memory allocated for an I/O buffer and
+ * resets the structure.
+ *
+ * Parameters :
+ * 1 : iob = I/O buffer to clear.
+ *
+ * Returns : JB_ERR_OK on success, JB_ERR_MEMORY if out-of-memory
+ * or buffer limit reached.
+ *
+ *********************************************************************/
+void clear_iob(struct iob *iob)
+{
+ free(iob->buf);
+ memset(iob, '\0', sizeof(*iob));;
+}
+
+
#ifdef FEATURE_ZLIB
/*********************************************************************
*
}
else if (csp->content_type & CT_DEFLATE)
{
- /*
- * XXX: The debug level should be lowered
- * before the next stable release.
- */
- log_error(LOG_LEVEL_INFO, "Decompressing deflated iob: %d", *cur);
/*
* In theory (that is, according to RFC 1950), deflate-compressed
* data should begin with a two-byte zlib header and have an
if ((csp->flags & CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE)
&& !(csp->flags & CSP_FLAG_SERVER_SOCKET_TAINTED)
- && !(csp->flags & CSP_FLAG_SERVER_PROXY_CONNECTION_HEADER_SET))
+ && !(csp->flags & CSP_FLAG_SERVER_PROXY_CONNECTION_HEADER_SET)
+ && ((csp->flags & CSP_FLAG_SERVER_CONTENT_LENGTH_SET)
+ || (csp->flags & CSP_FLAG_CHUNKED)))
{
log_error(LOG_LEVEL_HEADER, "Adding: %s", proxy_connection_header);
err = enlist(csp->headers, proxy_connection_header);
}
+#ifdef FEATURE_CONNECTION_KEEP_ALIVE
/*********************************************************************
*
* Function : get_expected_content_length
return content_length;
}
-
+#endif
/*
Local Variables: