X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=jcc.c;h=630d02b09dbeda070b4935876e17d4e823522fb5;hb=7b7b11d37675eec6370b889abbfc12b5fd95bd8d;hp=c0d3cba7e53c2ab7eb9f9aff316e64820f2cfa7b;hpb=f89cccf0ffd0b7f0ff484e2c6947aa0f2503118c;p=privoxy.git diff --git a/jcc.c b/jcc.c index c0d3cba7..630d02b0 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.298 2009/10/04 15:34:17 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.301 2009/10/08 07:36:37 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -1265,8 +1265,9 @@ static char *get_request_line(struct client_state *csp) { if (!data_is_available(csp->cfd, csp->config->socket_timeout)) { - log_error(LOG_LEVEL_ERROR, - "Stopped waiting for the request line."); + log_error(LOG_LEVEL_CONNECT, + "Stopped waiting for the request line. Timeout: %d.", + csp->config->socket_timeout); write_socket(csp->cfd, CLIENT_CONNECTION_TIMEOUT_RESPONSE, strlen(CLIENT_CONNECTION_TIMEOUT_RESPONSE)); return NULL; @@ -1602,7 +1603,9 @@ static void chat(struct client_state *csp) /* Skeleton for HTTP response, if we should intercept the request */ struct http_response *rsp; struct timeval timeout; +#ifdef FEATURE_CONNECTION_KEEP_ALIVE int watch_client_socket = 1; +#endif memset(buf, 0, sizeof(buf)); @@ -2608,7 +2611,6 @@ static void serve(struct client_state *csp) } } while (continue_chatting); - mark_connection_closed(&csp->server_connection); #else chat(csp); #endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ @@ -2621,6 +2623,10 @@ static void serve(struct client_state *csp) close_socket(csp->server_connection.sfd); } +#ifdef FEATURE_CONNECTION_KEEP_ALIVE + mark_connection_closed(&csp->server_connection); +#endif + if (csp->cfd != JB_INVALID_SOCKET) { close_socket(csp->cfd);