- if ((t->port == 0) || (t->port == rhttp->port))
- {
- if ((t->domain[0] == '\0') || domaincmp(t, url) == 0)
- {
- if ((t->path == NULL) ||
-#ifdef REGEX
- (regexec(t->preg, rhttp->path, 0, NULL, 0) == 0)
-#else
- (strncmp(t->path, rhttp->path, t->pathlen) == 0)
-#endif
- )
- {
- /* if the URL's referrer is from a trusted referrer, then
- * add the target spec to the trustfile as an unblocked
- * domain and return NULL (which means it's OK).
- */
-
- FILE *fp;
-
- freez(url->dbuf);
- freez(url->dvec);
-
- if ((fp = fopen(csp->config->trustfile, "a")))
- {
- h = NULL;
-
- h = strsav(h, "~");
- h = strsav(h, http->hostport);
-
- p = http->path;
- if ((*p++ == '/')
- && (*p++ == '~'))
- {
- /* since this path points into a user's home space
- * be sure to include this spec in the trustfile.
- */
- if ((p = strchr(p, '/')))
- {
- *p = '\0';
- h = strsav(h, http->path);
- h = strsav(h, "/");
- }
- }
-
- free_http_request(rhttp);
-
- fprintf(fp, "%s\n", h);
- freez(h);
- fclose(fp);
- }
- return(NULL);
- }
- }
- }
+ sprintf(buf, "<li>%s</li>\n", t->spec);
+ string_append(&p, buf);