X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=filters.c;h=ff70ac56a6bd954fd50ad6473f5b53f2e3f73c84;hp=e899f91d44c96ddd6f6558c75716bcef576633a5;hb=58bf18c4c8d7f01d11f4d46ebcc89a037598331e;hpb=fe05310ba6c210b1c6d03ccb2d13820e7589fce0 diff --git a/filters.c b/filters.c index e899f91d..ff70ac56 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.54 2002/04/02 14:55:56 oes Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.57 2002/04/08 20:38:34 swa Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -38,6 +38,16 @@ const char filters_rcs[] = "$Id: filters.c,v 1.54 2002/04/02 14:55:56 oes Exp $" * * Revisions : * $Log: filters.c,v $ + * Revision 1.57 2002/04/08 20:38:34 swa + * fixed JB spelling + * + * Revision 1.56 2002/04/05 15:51:24 oes + * - bugfix: error-pages now get correct request protocol + * - fix for invalid HTML in trust info + * + * Revision 1.55 2002/04/02 16:13:51 oes + * Fix: No "Go there anyway" for SSL + * * Revision 1.54 2002/04/02 14:55:56 oes * Bugfix: is_untrusted_url() now depends on FEATURE_TRUST, not FEATURE_COOKIE_JAR * @@ -363,7 +373,7 @@ const char filters_rcs[] = "$Id: filters.c,v 1.54 2002/04/02 14:55:56 oes Exp $" * a lot! ;-) * * Revision 1.3 2001/05/20 16:44:47 jongfoster - * Removing last hardcoded JunkBusters.com URLs. + * Removing last hardcoded Junkbusters.com URLs. * * Revision 1.2 2001/05/20 01:21:20 jongfoster * Version 2.9.4 checkin. @@ -827,6 +837,7 @@ struct http_response *block_url(struct client_state *csp) err = map_block_killer(exports, "force-support"); } + if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1); if (!err) err = map(exports, "hostport", 1, html_encode(csp->http->hostport), 0); if (!err) err = map(exports, "path", 1, html_encode(csp->http->path), 0); @@ -898,9 +909,10 @@ struct http_response *trust_url(struct client_state *csp) } /* - * Export the host, port, and referrer information + * Export the protocol, host, port, and referrer information */ err = map(exports, "hostport", 1, csp->http->hostport, 1); + if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1); if (!err) err = map(exports, "path", 1, csp->http->path, 1); if (NULL != (p = get_header_value(csp->headers, "Referer:"))) @@ -947,7 +959,7 @@ struct http_response *trust_url(struct client_state *csp) p = strdup(""); for (l = csp->config->trust_info->first; l ; l = l->next) { - sprintf(buf, "
  • %s
    \n",l->str, l->str); + sprintf(buf, "
  • %s
    \n",l->str, l->str); string_append(&p, buf); } err = map(exports, "trust-info", 1, p, 0); @@ -1489,16 +1501,21 @@ void url_actions(struct http_request *http, { struct file_list *fl; struct url_actions *b; + int i; init_current_action(csp->action); - if (((fl = csp->actions_list) == NULL) || ((b = fl->f) == NULL)) + for (i = 0; i < MAX_ACTION_FILES; i++) { - return; - } + if (((fl = csp->actions_list[i]) == NULL) || ((b = fl->f) == NULL)) + { + return; + } - apply_url_actions(csp->action, http, b); + apply_url_actions(csp->action, http, b); + } + return; }