X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=parsers.c;h=48195f897b8ac74d93631f14b43b01bc37f7c1a1;hp=e28cabaef1597449107c303871ca949465c80f73;hb=fc4b3fb95f0c3fad1619b5c7f533632be91d42dc;hpb=077000e8524dab83fc33ff1366238d242bab4cb0 diff --git a/parsers.c b/parsers.c index e28cabae..48195f89 100644 --- a/parsers.c +++ b/parsers.c @@ -68,7 +68,7 @@ #include #endif -#if !defined(_WIN32) && !defined(__OS2__) +#if !defined(_WIN32) #include #endif @@ -141,10 +141,10 @@ static jb_err server_save_content_length(struct client_state *csp, char **header static jb_err server_keep_alive(struct client_state *csp, char **header); static jb_err server_proxy_connection(struct client_state *csp, char **header); static jb_err client_keep_alive(struct client_state *csp, char **header); -static jb_err client_save_content_length(struct client_state *csp, char **header); static jb_err client_proxy_connection(struct client_state *csp, char **header); #endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ +static jb_err client_save_content_length(struct client_state *csp, char **header); static jb_err client_host_adder (struct client_state *csp); static jb_err client_xtra_adder (struct client_state *csp); static jb_err client_x_forwarded_for_adder(struct client_state *csp); @@ -188,9 +188,9 @@ static const struct parsers client_patterns[] = { { "TE:", 3, client_te }, { "Host:", 5, client_host }, { "if-modified-since:", 18, client_if_modified_since }, + { "Content-Length:", 15, client_save_content_length }, #ifdef FEATURE_CONNECTION_KEEP_ALIVE { "Keep-Alive:", 11, client_keep_alive }, - { "Content-Length:", 15, client_save_content_length }, { "Proxy-Connection:", 17, client_proxy_connection }, #else { "Keep-Alive:", 11, crumble }, @@ -727,6 +727,7 @@ jb_err decompress_iob(struct client_state *csp) { log_error(LOG_LEVEL_ERROR, "Buffer limit reached while decompressing iob"); freez(buf); + inflateEnd(&zstr); return JB_ERR_MEMORY; } @@ -745,6 +746,7 @@ jb_err decompress_iob(struct client_state *csp) { log_error(LOG_LEVEL_ERROR, "Out of memory decompressing iob"); freez(buf); + inflateEnd(&zstr); return JB_ERR_MEMORY; } else @@ -1850,6 +1852,7 @@ static jb_err server_proxy_connection(struct client_state *csp, char **header) csp->flags |= CSP_FLAG_SERVER_PROXY_CONNECTION_HEADER_SET; return JB_ERR_OK; } +#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ /********************************************************************* @@ -1882,6 +1885,7 @@ static jb_err proxy_authentication(struct client_state *csp, char **header) } +#ifdef FEATURE_CONNECTION_KEEP_ALIVE /********************************************************************* * * Function : client_keep_alive @@ -1948,6 +1952,7 @@ static jb_err client_keep_alive(struct client_state *csp, char **header) return JB_ERR_OK; } +#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ /********************************************************************* @@ -2020,8 +2025,6 @@ static jb_err client_save_content_length(struct client_state *csp, char **header return JB_ERR_OK; } -#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ - /********************************************************************* @@ -4883,7 +4886,6 @@ static void create_content_length_header(unsigned long long content_length, } -#ifdef FEATURE_CONNECTION_KEEP_ALIVE /********************************************************************* * * Function : get_expected_content_length @@ -4915,7 +4917,7 @@ unsigned long long get_expected_content_length(struct list *headers) return content_length; } -#endif + /* Local Variables: