소스 검색

special case so we don't yell when an empty http body doesn't specify a
content-encoding


svn:r3397

Roger Dingledine 21 년 전
부모
커밋
4826718eac
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/or/directory.c

+ 2 - 0
src/or/directory.c

@@ -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) {