CocoaHTTPServer icon indicating copy to clipboard operation
CocoaHTTPServer copied to clipboard

Crash of array method

Open kimiWu opened this issue 8 years ago • 1 comments

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};

kimiWu avatar Jun 02 '17 03:06 kimiWu

https://github.com/robbiehanson/CocoaHTTPServer/issues/78 I was also facing the same issue and I found the solution here.

adeeltahir98 avatar Jul 22 '20 05:07 adeeltahir98