]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
special case so we don't yell when an empty http body doesn't specify a
authorRoger Dingledine <arma@torproject.org>
Fri, 21 Jan 2005 03:18:49 +0000 (03:18 +0000)
committerRoger Dingledine <arma@torproject.org>
Fri, 21 Jan 2005 03:18:49 +0000 (03:18 +0000)
content-encoding

svn:r3397

src/or/directory.c

index ee50f46e77a8cfdb4f86e73f474c64dfccae00e2..e9255747e328afba47bb92b77d6a78283f9f0269 100644 (file)
@@ -555,6 +555,8 @@ static int
 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) {