* Purpose : Main file. Contains main() method, main loop, and
* the main connection-handling function.
*
* Purpose : Main file. Contains main() method, main loop, and
* the main connection-handling function.
*
- while ((content_length_known && csp->expected_client_content_length != 0) ||
- (is_ssl_pending(&(csp->ssl_client_attr)) ||
- data_is_available(csp->cfd, csp->config->socket_timeout)))
+ while (is_ssl_pending(&(csp->ssl_client_attr))
+ || (content_length_known && csp->expected_client_content_length != 0))
if (csp->expected_client_content_length < flushed)
{
log_error(LOG_LEVEL_ERROR,
if (csp->expected_client_content_length < flushed)
{
log_error(LOG_LEVEL_ERROR,
flushed, csp->expected_client_content_length);
csp->expected_client_content_length = 0;
}
else
{
log_error(LOG_LEVEL_CONNECT,
flushed, csp->expected_client_content_length);
csp->expected_client_content_length = 0;
}
else
{
log_error(LOG_LEVEL_CONNECT,
flushed, csp->expected_client_content_length);
csp->expected_client_content_length -= (unsigned)flushed;
if (receive_and_send_encrypted_post_data(csp))
flushed, csp->expected_client_content_length);
csp->expected_client_content_length -= (unsigned)flushed;
if (receive_and_send_encrypted_post_data(csp))
if (!is_ssl_pending(&(csp->ssl_client_attr)) &&
!data_is_available(csp->cfd, csp->config->socket_timeout))
{
log_error(LOG_LEVEL_CONNECT,
if (!is_ssl_pending(&(csp->ssl_client_attr)) &&
!data_is_available(csp->cfd, csp->config->socket_timeout))
{
log_error(LOG_LEVEL_CONNECT,
- log_error(LOG_LEVEL_CONNECT,
- "Reducing chunk offset from %lu to %lu after flushing %ld bytes",
+ log_error(LOG_LEVEL_CONNECT, "Reducing the chunk offset "
+ "from %lu to %lu after flushing %ld bytes.",
chunk_offset, (chunk_offset - (unsigned)len), len);
chunk_offset = chunk_offset - (unsigned)len;
}
else
{
log_error(LOG_LEVEL_CONNECT,
chunk_offset, (chunk_offset - (unsigned)len), len);
chunk_offset = chunk_offset - (unsigned)len;
}
else
{
log_error(LOG_LEVEL_CONNECT,