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

[or-cvs] special case so we don"t yell when an empty http body doesn...



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

Modified Files:
	directory.c 
Log Message:
special case so we don't yell when an empty http body doesn't specify a
content-encoding


Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -d -r1.200 -r1.201
--- directory.c	21 Jan 2005 00:45:18 -0000	1.200
+++ directory.c	21 Jan 2005 03:18:49 -0000	1.201
@@ -555,6 +555,8 @@
 body_is_plausible(const char *body, size_t len, int purpose)
 {
   int i;
+  if (len == 0)
+    return 1; /* empty bodies don't need decompression */
   if (len < 32)
     return 0;
   if (purpose != DIR_PURPOSE_FETCH_RENDDESC) {