Author: poeml Date: Sat Mar 27 05:27:35 2010 New Revision: 8019 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8019&view=rev Log: mod_mirrorbrain: - zsync-0.6.1 requires real mirrors as URLs, not one URL that redirects. 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=8019&r1=8018&r2=8019&view=diff ============================================================================== --- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original) +++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Sat Mar 27 05:27:35 2010 _at_@ -738,7 +738,7 @@ } /* - * This routine out an URL in the format needed for old (v3) or newer (IETF) + * This routine returns an URL in the format needed for old (v3) or newer (IETF) * Metalinks. */ static void emit_metalink_url(request_rec *r, int rep, _at_@ -1559,7 +1559,6 @@ ap_rputs("</body></html>\n", r); return OK; case TORRENT: - case ZSYNC: break; case META4: case METALINK: _at_@ -2641,7 +2640,34 @@ ap_rprintf(r, "Blocksize: %d\n", hashbag->zblocksize); ap_rprintf(r, "Length: %s\n", apr_off_t_toa(r->pool, r->finfo.size)); ap_rprintf(r, "Hash-Lengths: %s\n", hashbag->zhashlens); - ap_rprintf(r, "URL: http://%s%s\n", r->hostname, r->uri); + + /* URLs */ + mirrorp = (mirror_entry_t **)mirrors_same_prefix->elts; + for (i = 0; i < mirrors_same_prefix->nelts; i++) { + mirror = mirrorp[i]; + ap_rprintf(r, "URL: %s%s\n", mirror->baseurl, filename); + } + mirrorp = (mirror_entry_t **)mirrors_same_as->elts; + for (i = 0; i < mirrors_same_as->nelts; i++) { + mirror = mirrorp[i]; + ap_rprintf(r, "URL: %s%s\n", mirror->baseurl, filename); + } + mirrorp = (mirror_entry_t **)mirrors_same_country->elts; + for (i = 0; i < mirrors_same_country->nelts; i++) { + mirror = mirrorp[i]; + ap_rprintf(r, "URL: %s%s\n", mirror->baseurl, filename); + } + mirrorp = (mirror_entry_t **)mirrors_same_region->elts; + for (i = 0; i < mirrors_same_region->nelts; i++) { + mirror = mirrorp[i]; + ap_rprintf(r, "URL: %s%s\n", mirror->baseurl, filename); + } + mirrorp = (mirror_entry_t **)mirrors_elsewhere->elts; + for (i = 0; i < mirrors_elsewhere->nelts; i++) { + mirror = mirrorp[i]; + ap_rprintf(r, "URL: %s%s\n", mirror->baseurl, filename); + } + ap_rprintf(r, "SHA-1: %s\n\n", hashbag->sha1hex); if (!hashbag->zsumshex || !hashbag->zsumshex[0]) { _______________________________________________ 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 Sat Mar 27 2010 - 04:27:39 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT