[or-cvs] post descriptors to 0.0.8 authdirservers the old way, to ma...
Roger Dingledine
arma at seul.org
Mon Sep 27 03:51:00 UTC 2004
Update of /home2/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv27927
Modified Files:
directory.c
Log Message:
post descriptors to 0.0.8 authdirservers the old way, to make the
transition easier
Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/src/or/directory.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- directory.c 27 Sep 2004 03:39:30 -0000 1.129
+++ directory.c 27 Sep 2004 03:50:58 -0000 1.130
@@ -235,7 +235,8 @@
break;
case DIR_PURPOSE_UPLOAD_DIR:
tor_assert(payload);
- snprintf(tmp, sizeof(tmp), "POST /tor/ HTTP/1.0\r\nContent-Length: %d\r\n\r\n",
+ snprintf(tmp, sizeof(tmp), "POST %s/ HTTP/1.0\r\nContent-Length: %d\r\n\r\n",
+ strcmpstart(router->platform, "Tor 0.0.8") ? "/tor" : "",
payload_len);
connection_write_to_buf(tmp, strlen(tmp), conn);
connection_write_to_buf(payload, payload_len, conn);
@@ -595,6 +596,7 @@
connection_write_to_buf(answer400, strlen(answer400), conn);
return 0;
}
+ log_fn(LOG_INFO,"rewritten url as '%s'.", url);
if(!strcmp(url,"/tor/") || !strcmp(url,"/tor/dir.z")) { /* directory fetch */
int deflated = !strcmp(url,"/tor/dir.z");
@@ -710,7 +712,7 @@
connection_write_to_buf(answer400, strlen(answer400), conn);
return 0;
}
- log_fn(LOG_INFO,"url '%s' posted to us.", url);
+ log_fn(LOG_INFO,"rewritten url as '%s'.", url);
if(!strcmp(url,"/tor/")) { /* server descriptor post */
cp = body;
More information about the tor-commits
mailing list