aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-09-02 18:57:09 +0000
committerNick Mathewson <nickm@torproject.org>2004-09-02 18:57:09 +0000
commitd6e47bec460501b5d05903e90d6cf8188cd47de6 (patch)
treecbf3d3beb47226a2b111756ff646ca3d463554a1 /src/or/directory.c
parentbda41ba3fdcedf1bf9564e9b57d656bb6565f076 (diff)
downloadtor-d6e47bec460501b5d05903e90d6cf8188cd47de6.tar
tor-d6e47bec460501b5d05903e90d6cf8188cd47de6.tar.gz
Keep a deflated version of each directory so we can deliver it when requested
svn:r2328
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 1a951f02b..4ca210bc0 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -313,7 +313,7 @@ parse_http_response(char *headers, int *code, char **message, time_t *date)
while (cp && (cp = strchr(cp, '\n'))) {
++cp;
strlcpy(datestr, cp, 7);
- if (strncmp(cp, "Date: ", 6) == 0) {
+ if (strcmpstart(cp, "Date: ") == 0) {
strlcpy(datestr, cp+6, sizeof(datestr));
/* This will do nothing on failure, so we don't need to check
the result. We shouldn't warn, since there are many other valid
@@ -546,7 +546,7 @@ directory_handle_command_get(connection_t *conn, char *headers,
}
if(!strcmp(url,"/")) { /* directory fetch */
- dlen = dirserv_get_directory(&cp);
+ dlen = dirserv_get_directory(&cp, 0);
if(dlen == 0) {
log_fn(LOG_WARN,"My directory is empty. Closing.");
@@ -664,7 +664,7 @@ directory_handle_command_post(connection_t *conn, char *headers,
connection_write_to_buf(answer403, strlen(answer403), conn);
break;
case 1:
- dirserv_get_directory(&cp); /* rebuild and write to disk */
+ dirserv_get_directory(&cp, 0); /* rebuild and write to disk */
connection_write_to_buf(answer200, strlen(answer200), conn);
break;
}