NSPOSIXErrorDomain Code-54. "Operation couldn't be completed. Connection reset by peer"

StackOverflow https://stackoverflow.com/questions/19763417

  •  03-07-2022
  •  | 
  •  

سؤال

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

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top