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

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top