Преглед изворни кода

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;