X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=filters.c;h=2a1f46b254a302ae292f68a49564baddea611220;hp=b047a0234eefc28a1d751f4e740b9719be4032a0;hb=4aad1422119ebb4c3452ea1ae20de77cb46861ee;hpb=e9a5ad6d641da0da0aafe50b0cc6cd3901a04c67 diff --git a/filters.c b/filters.c index b047a023..2a1f46b2 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.135 2010/10/10 09:58:12 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.142 2011/04/19 13:00:47 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -485,7 +485,7 @@ int acl_addr(const char *aspec, struct access_control_addr *aca) * of octets (128-bit CPU could do it in one iteration). */ /* - * Octets after prefix can be ommitted because of + * Octets after prefix can be omitted because of * previous initialization to zeros. */ for (i = 0; (i < addr_len) && masklength; i++) @@ -728,11 +728,11 @@ struct http_response *block_url(struct client_state *csp) && !strstr(p, "compatible") /* MSIE */ && !strstr(p, "Opera")) /* and Opera. */ { - rsp->status = strdup("200 Request for blocked URL"); + rsp->status = strdup("200 Request blocked by Privoxy"); } else { - rsp->status = strdup("403 Request for blocked URL"); + rsp->status = strdup("403 Request blocked by Privoxy"); } if (rsp->status == NULL) @@ -1002,10 +1002,9 @@ pcrs_job *compile_dynamic_pcrs_job_list(const struct client_state *csp, const st dummy = pcrs_compile_dynamic_command(pattern->str, variables, &error); if (NULL == dummy) { - assert(error < 0); log_error(LOG_LEVEL_ERROR, - "Adding filter job \'%s\' to dynamic filter %s failed: %s", - pattern->str, b->name, pcrs_strerror(error)); + "Compiling dynamic pcrs job '%s' for '%s' failed with error code %d: %s", + pattern->str, b->name, error, pcrs_strerror(error)); continue; } else @@ -1805,8 +1804,14 @@ static jb_err remove_chunked_transfer_coding(char *buffer, size_t *size) if ((newsize += chunksize) >= *size) { + /* + * XXX: The message is a bit confusing. Isn't the real problem that + * the specified chunk size is greater than the number of bytes + * left in the buffer? This probably means the connection got + * closed prematurely. To be investigated after 3.0.17 is out. + */ log_error(LOG_LEVEL_ERROR, - "Chunk size %d exceeds buffer size %d in \"chunked\" transfer coding", + "Chunk size %d exceeds buffer size %d in \"chunked\" transfer coding", chunksize, *size); return JB_ERR_PARSE; } @@ -2226,7 +2231,7 @@ struct http_response *direct_response(struct client_state *csp) { for (p = csp->headers->first; (p != NULL) ; p = p->next) { - if (!strncmpic("Max-Forwards:", p->str, 13)) + if (!strncmpic(p->str, "Max-Forwards:", 13)) { unsigned int max_forwards;