[or-cvs] set Content-Type on the directory and hidserv descriptor
Roger Dingledine
arma at seul.org
Tue Apr 27 21:48:39 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
directory.c rendmid.c
Log Message:
set Content-Type on the directory and hidserv descriptor
Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- directory.c 25 Apr 2004 20:37:37 -0000 1.92
+++ directory.c 27 Apr 2004 21:48:37 -0000 1.93
@@ -354,7 +354,7 @@
}
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 @@
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);
Index: rendmid.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendmid.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- rendmid.c 26 Apr 2004 23:02:20 -0000 1.19
+++ rendmid.c 27 Apr 2004 21:48:37 -0000 1.20
@@ -173,7 +173,7 @@
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
More information about the tor-commits
mailing list