X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=jcc.c;h=32e6f0d8449dd7d01c16978871668cc611c6292c;hb=0c556e7b91320783f6ff77d63053bc95bd1d116a;hp=7a706ef6d094e66b26fca8460589ed80add39763;hpb=93e9e31a1f5368ef0c1925e25288b735c6f58d3b;p=privoxy.git diff --git a/jcc.c b/jcc.c index 7a706ef6..32e6f0d8 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.385 2012/07/27 17:39:57 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.387 2012/09/04 08:37:51 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -1454,6 +1454,12 @@ static jb_err parse_client_request(struct client_state *csp) /* Assume persistence until further notice */ csp->flags |= CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE; } + + if (csp->http->ssl == 0) + { + csp->expected_client_content_length = get_expected_content_length(csp->headers); + verify_request_length(csp); + } #endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ err = sed(csp, FILTER_CLIENT_HEADERS); @@ -1484,13 +1490,6 @@ static jb_err parse_client_request(struct client_state *csp) return JB_ERR_PARSE; } -#ifdef FEATURE_CONNECTION_KEEP_ALIVE - if (csp->http->ssl == 0) - { - verify_request_length(csp); - } -#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ - return JB_ERR_OK; } @@ -2508,6 +2507,9 @@ static void serve(struct client_state *csp) #endif /* def FEATURE_CONNECTION_SHARING */ int continue_chatting = 0; + log_error(LOG_LEVEL_CONNECT, "Accepted connection from %s on socket %d", + csp->ip_addr_str, csp->cfd); + do { unsigned int latency; @@ -3555,12 +3557,6 @@ static void listen_loop(void) freez(csp_list); continue; } - else - { - log_error(LOG_LEVEL_CONNECT, - "accepted connection from %s on socket %d", - csp->ip_addr_str, csp->cfd); - } csp->flags |= CSP_FLAG_ACTIVE; csp->server_connection.sfd = JB_INVALID_SOCKET;