NSPOSIXErrorDomain Code-54. "Operation couldn't be completed. Connection reset by peer"
-
03-07-2022 - |
Question
Getting the above error when trying to redirect the entered URL through proxy server to a new request.
NSMutableURLRequest *newRequest = [self.request mutableCopy];
newRequest.HTTPMethod = @"GET";
[newRequest setHTTPBody:nil];
[newRequest setValue:nil forHTTPHeaderField:@"Content-Length"];
[newRequest setValue:nil forHTTPHeaderField:@"Content-Type"];
[newRequest setValue:nil forHTTPHeaderField:@"Proxy-Authorization"];
[newRequest setCachePolicy:NSURLRequestUseProtocolCachePolicy];
[newRequest setURL:toURL];
[[self client] URLProtocol:self wasRedirectedToRequest:newRequest redirectResponse:response];
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow