diff --git a/WebViewProxy/WebViewProxy.m b/WebViewProxy/WebViewProxy.m index bbb5ace..e0543fd 100644 --- a/WebViewProxy/WebViewProxy.m +++ b/WebViewProxy/WebViewProxy.m @@ -213,7 +213,8 @@ @implementation WebViewProxyURLProtocol { } @synthesize proxyResponse=_proxyResponse, requestMatcher=_requestMatcher; + (WVPRequestMatcher *)findRequestMatcher:(NSURL *)url { - for (WVPRequestMatcher* requestMatcher in requestMatchers) { + NSMutableArray* requestMatchersCopy = [requestMatchers mutableCopy]; + for (WVPRequestMatcher* requestMatcher in requestMatchersCopy) { if ([requestMatcher.predicate evaluateWithObject:url]) { return requestMatcher; }