소스 검색

Fix #117: limit network response size

Limit cached network response size to 50 MB
Tanner Bennett 8 년 전
부모
커밋
8b7c59d949
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Classes/Network/PonyDebugger/FLEXNetworkObserver.m

+ 1 - 1
Classes/Network/PonyDebugger/FLEXNetworkObserver.m

@@ -944,7 +944,7 @@ static char const * const kFLEXRequestIDKey = "kFLEXRequestIDKey";
         NSMutableData *dataAccumulator = nil;
         if (response.expectedContentLength < 0) {
             dataAccumulator = [[NSMutableData alloc] init];
-        } else {
+        } else if (response.expectedContentLength < 52428800) {
             dataAccumulator = [[NSMutableData alloc] initWithCapacity:(NSUInteger)response.expectedContentLength];
         }
         requestState.dataAccumulator = dataAccumulator;