diff options
author | Roger Dingledine <arma@torproject.org> | 2005-12-29 04:57:19 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-12-29 04:57:19 +0000 |
commit | 2904c6f024817f294ab01cdb081264e8387babd9 (patch) | |
tree | 5de0240b0ef1d3888aa74bd3be105879dab7b52d /src/or/directory.c | |
parent | 14ea2e0b5677c6b72755e6103280df3e765dfcd0 (diff) | |
download | tor-2904c6f024817f294ab01cdb081264e8387babd9.tar.gz tor-2904c6f024817f294ab01cdb081264e8387babd9.zip |
log how big the failed rend descriptor is, and if it's small, log
a base16 of the whole thing.
svn:r5678
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 0d0b46bd27..855c0b5f28 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -1556,7 +1556,13 @@ directory_handle_command_post(connection_t *conn, char *headers, if (!strcmpstart(url,"/tor/rendezvous/publish")) { /* rendezvous descriptor post */ if (rend_cache_store(body, body_len) < 0) { - notice(LD_DIRSERV,"Rejected rend descriptor from %s.", origin); + char tmp[1024*2+1]; + notice(LD_DIRSERV,"Rejected rend descriptor (length %d) from %s.", + (int)body_len, origin); + if (body_len <= 1024) { + base16_encode(tmp, sizeof(tmp), body, body_len); + notice(LD_DIRSERV,"Body was: %s", tmp); + } write_http_status_line(conn, 400, "Invalid service descriptor rejected"); } else { write_http_status_line(conn, 200, "Service descriptor stored"); |