Domanda

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

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top