X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=jcc.c;h=56e07d8c39f1622fdbdd3488538ead17307e3806;hb=18cdf8583164db8b02d1f2664603ce64ef291f07;hp=534906605ebb974a52ebcb32405cf13f2872179b;hpb=fe464161f250e88304cbc4ff311a9806f09e05ce;p=privoxy.git diff --git a/jcc.c b/jcc.c index 53490660..56e07d8c 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.350 2011/04/26 16:55:08 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.352 2011/05/27 11:34:39 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2061,6 +2061,19 @@ static void chat(struct client_state *csp) { csp->content_length = (size_t)(csp->iob->eod - csp->iob->cur); } +#ifdef FEATURE_COMPRESSION + else if ((csp->flags & CSP_FLAG_CLIENT_SUPPORTS_DEFLATE) + && (csp->content_length > LOWER_LENGTH_LIMIT_FOR_COMRPESSION)) + { + char *compressed_content = compress_buffer(p, (size_t *)&csp->content_length); + if (compressed_content != NULL) + { + freez(p); + p = compressed_content; + csp->flags |= CSP_FLAG_BUFFERED_CONTENT_DEFLATED; + } + } +#endif if (JB_ERR_OK != update_server_headers(csp)) { @@ -2901,7 +2914,7 @@ int main(int argc, char **argv) pName++; exit( (install_service(pName)) ? 0 : 1 ); } - else if (strncmp(argv[argc_pos], "--uninstall", + 11) == 0) + else if (strncmp(argv[argc_pos], "--uninstall", 11) == 0) { const char *pName = argv[argc_pos] + 11; if (*pName == ':')