CocoaHTTPServer
CocoaHTTPServer copied to clipboard
Crash of array method
Fatal Exception: NSRangeException *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array
in HttpConnection.m 1477 line.
DDRange range = [[ranges objectAtIndex:rangeIndex] ddrangeValue];
should modify to :
DDRange range = ((rangeIndex >= 0) && (ranges.count < rangeIndex)) ? [[ranges objectAtIndex:rangeIndex] ddrangeValue] : (DDRange){0};
https://github.com/robbiehanson/CocoaHTTPServer/issues/78 I was also facing the same issue and I found the solution here.