Skip to content
Browse files

added blocks to copy method. It caused blocks not be fired in cloned …

…requests
  • Loading branch information...
1 parent 3ed0b3c commit ed0b2e0aa62d34adbdc9cedc06c4de5915dfee00 @jmnavarro committed Jan 11, 2013
Showing with 13 additions and 0 deletions.
  1. +13 −0 Classes/ASIHTTPRequest.m
View
13 Classes/ASIHTTPRequest.m
@@ -4099,6 +4099,19 @@ - (id)copyWithZone:(NSZone *)zone
[newRequest setShouldAttemptPersistentConnection:[self shouldAttemptPersistentConnection]];
[newRequest setPersistentConnectionTimeoutSeconds:[self persistentConnectionTimeoutSeconds]];
[newRequest setAuthenticationScheme:[self authenticationScheme]];
+#if NS_BLOCKS_AVAILABLE
+ [newRequest setStartedBlock:startedBlock];
+ [newRequest setHeadersReceivedBlock:headersReceivedBlock];
+ [newRequest setCompletionBlock:completionBlock];
+ [newRequest setBytesReceivedBlock:bytesReceivedBlock];
+ [newRequest setBytesSentBlock:bytesSentBlock];
+ [newRequest setDownloadSizeIncrementedBlock:downloadSizeIncrementedBlock];
+ [newRequest setUploadSizeIncrementedBlock:uploadSizeIncrementedBlock];
+ [newRequest setDataReceivedBlock:dataReceivedBlock];
+ [newRequest setAuthenticationNeededBlock:authenticationNeededBlock];
+ [newRequest setProxyAuthenticationNeededBlock:proxyAuthenticationNeededBlock];
+ [newRequest setRequestRedirectedBlock:requestRedirectedBlock];
+#endif
return newRequest;
}

0 comments on commit ed0b2e0

Please sign in to comment.
Something went wrong with that request. Please try again.