summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-27 21:48:37 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-27 21:48:37 +0000
commit158e2cf536f02aafae1795897563af678dbd0e50 (patch)
treec664ad13c46c488d0cb2fa454e07005dc9164ef8
parent9965bd8387cf2f7a838245d3999bb84af51fccf1 (diff)
downloadtor-158e2cf536f02aafae1795897563af678dbd0e50.tar.gz
tor-158e2cf536f02aafae1795897563af678dbd0e50.zip
set Content-Type on the directory and hidserv descriptor
svn:r1731
-rw-r--r--src/or/directory.c4
-rw-r--r--src/or/rendmid.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 7c3e68a679..1c8fa059a0 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -354,7 +354,7 @@ static int directory_handle_command_get(connection_t *conn,
}
log_fn(LOG_DEBUG,"Dumping directory to client.");
- snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nContent-Length: %d\r\n\r\n",
+ snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: text/plain\r\n\r\n",
(int)dlen);
connection_write_to_buf(tmp, strlen(tmp), conn);
connection_write_to_buf(cp, strlen(cp), conn);
@@ -368,7 +368,7 @@ static int directory_handle_command_get(connection_t *conn,
switch(rend_cache_lookup_desc(url+strlen(rend_fetch_url), &descp, &desc_len)) {
case 1: /* valid */
- snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nContent-Length: %d\r\n\r\n",
+ snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: application/octet-stream\r\n\r\n",
desc_len); /* can't include descp here, because it's got nuls */
connection_write_to_buf(tmp, strlen(tmp), conn);
connection_write_to_buf(descp, desc_len, conn);
diff --git a/src/or/rendmid.c b/src/or/rendmid.c
index b40e81b48b..10eeab4dff 100644
--- a/src/or/rendmid.c
+++ b/src/or/rendmid.c
@@ -173,7 +173,7 @@ rend_mid_introduce(circuit_t *circ, const char *request, int request_len)
return -1;
}
-/* Process an ESTABLISH_RENDEZVOUS cell by settingthe circuit's purpose and
+/* Process an ESTABLISH_RENDEZVOUS cell by setting the circuit's purpose and
* rendezvous cookie.
*/
int