[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] allow for directories >8192 bytes



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	directory.c 
Log Message:
allow for directories >8192 bytes


Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- directory.c	7 Apr 2004 22:41:00 -0000	1.86
+++ directory.c	8 Apr 2004 01:47:33 -0000	1.87
@@ -111,9 +111,10 @@
       break;
     case DIR_PURPOSE_UPLOAD_DIR:
       assert(payload);
-      snprintf(tmp, sizeof(tmp), "POST / HTTP/1.0\r\nContent-Length: %d\r\n\r\n%s",
-               payload_len, payload);
+      snprintf(tmp, sizeof(tmp), "POST / HTTP/1.0\r\nContent-Length: %d\r\n\r\n",
+               payload_len);
       connection_write_to_buf(tmp, strlen(tmp), conn);
+      connection_write_to_buf(payload, payload_len, conn);
       break;
     case DIR_PURPOSE_FETCH_RENDDESC:
       assert(payload);
@@ -360,9 +361,10 @@
     }
 
     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%s",
-             (int)dlen, cp);
+    snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nContent-Length: %d\r\n\r\n",
+             (int)dlen);
     connection_write_to_buf(tmp, strlen(tmp), conn);
+    connection_write_to_buf(cp, strlen(cp), conn);
     return 0;
   }