+ exports = map(exports, "force-prefix", 1, FORCE_PREFIX, 1);
+#else
+ exports = map_block_killer(exports, "force-support");
+#endif /* ndef FORCE_LOAD */
+
+ exports = map(exports, "hostport", 1, csp->http->hostport, 1);
+ exports = map(exports, "hostport-html", 1, html_encode(csp->http->hostport), 0);
+ exports = map(exports, "path", 1, csp->http->path, 1);
+ exports = map(exports, "path-html", 1, html_encode(csp->http->path), 0);
+
+ rsp->body = fill_template(csp, "blocked", exports);
+ free_map(exports);
+
+ /*
+ * Workaround for stupid Netscape bug which prevents
+ * pages from being displayed if loading a referenced
+ * JavaScript or style sheet fails. So make it appear
+ * as if it succeeded.
+ */
+ if (csp->http->user_agent
+ && !strncmpic(csp->http->user_agent, "mozilla", 7)
+ && !strstr(csp->http->user_agent, "compatible")
+ && !strstr(csp->http->user_agent, "Opera"))
+ {
+ rsp->status = strdup("200 Request for blocked URL");
+ }
+ else
+ {
+ rsp->status = strdup("404 Request for blocked URL");
+ }
+
+ }
+
+ return(finish_http_response(rsp));
+
+}
+
+
+#ifdef TRUST_FILES
+/*********************************************************************
+ *
+ * Function : trust_url FIXME: I should be called distrust_url
+ *
+ * Description : Calls is_untrusted_url to determine if the URL is trusted
+ * and if not, returns a HTTP 304 response with a reject message.
+ *
+ * Parameters :
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ *
+ * Returns : NULL => trusted, else http_response.
+ *
+ *********************************************************************/
+struct http_response *trust_url(struct client_state *csp)
+{
+ struct http_response *rsp;
+ struct map *exports = NULL;
+ char buf[BUFFER_SIZE], *p = NULL;
+ struct url_spec **tl, *t;