aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-09-27 03:50:58 +0000
committerRoger Dingledine <arma@torproject.org>2004-09-27 03:50:58 +0000
commita64d0933396aa2eb52e23c82d4f6ae4f6b237187 (patch)
treea958a46b1f0181bf78143b7da43fce01ac6fcaec /src/or/directory.c
parent10df7d9afc42a055ceb6bfe44dadf8adad9d79f7 (diff)
downloadtor-a64d0933396aa2eb52e23c82d4f6ae4f6b237187.tar
tor-a64d0933396aa2eb52e23c82d4f6ae4f6b237187.tar.gz
post descriptors to 0.0.8 authdirservers the old way, to make the
transition easier svn:r2379
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 7c9edcc26..278b042df 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -235,7 +235,8 @@ static void directory_send_command(connection_t *conn, int purpose,
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 @@ directory_handle_command_get(connection_t *conn, char *headers,
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 @@ directory_handle_command_post(connection_t *conn, char *headers,
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;