Author: poeml Date: Fri Mar 12 17:50:37 2010 New Revision: 7992 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7992&view=rev Log: mod_mirrorbrain: - fix mime type of hash representions - link from the mirror lists to the hashes representations Modified: trunk/mod_mirrorbrain/mod_mirrorbrain.c Modified: trunk/mod_mirrorbrain/mod_mirrorbrain.c URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mod_mirrorbrain/mod_mirrorbrain.c?rev=7992&r1=7991&r2=7992&view=diff ============================================================================== --- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original) +++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Fri Mar 12 17:50:37 2010 _at_@ -1298,7 +1298,7 @@ } if (h && h[0]) { - ap_set_content_type(r, "text/html; charset=UTF-8"); + ap_set_content_type(r, "text/plain; charset=UTF-8"); ap_rprintf(r, "%s %s\n", h, basename); return OK; } _at_@ -2221,14 +2221,15 @@ ap_rprintf(r, " <li>Last modified: %s (Unix time: %lld)</li>\n", time_str, r->finfo.mtime / 1000000); if (hashbag != NULL) { - /* XXX we should link to the hash, but we need to build a handler for it first - * <a href=\"http://%s%s.sha256\">(link)</a> */ if (hashbag->sha256) - ap_rprintf(r, " <li>SHA-256 sum: <tt>%s</tt></li>\n", hashbag->sha256); + ap_rprintf(r, " <li><a href=\"http://%s%s.sha256\">SHA-256 Hash</a>: <tt>%s</tt> " + "</li>\n", r->hostname, r->uri, hashbag->sha256); if (hashbag->sha1) - ap_rprintf(r, " <li>SHA-1 sum: <tt>%s</tt></li>\n", hashbag->sha1); + ap_rprintf(r, " <li><a href=\"http://%s%s.sha1\">SHA-1 Hash</a>: <tt>%s</tt> " + "</li>\n", r->hostname, r->uri, hashbag->sha1); if (hashbag->md5) - ap_rprintf(r, " <li>MD5 sum: <tt>%s</tt></li>\n", hashbag->md5); + ap_rprintf(r, " <li><a href=\"http://%s%s.md5\">MD5 Hash</a>: <tt>%s</tt> " + "</li>\n", r->hostname, r->uri, hashbag->md5); /* XXX we could link to the signature if (hashbag->pgp) { _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Fri Mar 12 2010 - 16:50:38 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT