Re: WebView NSURLProtocol Tiger problems.
Re: WebView NSURLProtocol Tiger problems.
- Subject: Re: WebView NSURLProtocol Tiger problems.
- From: "Mr. Gecko" <email@hidden>
- Date: Thu, 4 Nov 2010 11:17:09 -0500
In the start loading method, this is what I'm doing if it helps some. I found that I cannot do a web server with this as it doesn't forward the post data which is important in this application.
- (void)startLoading {
NSURLResponse *response = [[NSURLResponse alloc] initWithURL:[[self request] URL] MIMEType:@"text/html" expectedContentLength:0 textEncodingName:nil];
NSMutableURLRequest *request = [[self request] mutableCopy];
NSString *url = [[request URL] absoluteString];
NSRange range = [url rangeOfString:@":"];
url = [@"https" stringByAppendingString:[url substringFromIndex:range.location]];
[request setURL:[NSURL URLWithString:url]];
id<NSURLProtocolClient> client = [self client];
[client URLProtocol:self wasRedirectedToRequest:request redirectResponse:response];
[client URLProtocolDidFinishLoading:self];
[request release];
[response release];
}
On Nov 4, 2010, at 10:55 AM, Mr. Gecko wrote:
> For some reason, on tiger, when you make your own protocol using NSURLProtocol and respond with URLProtocol:wasRedirectedToRequest:redirectResponse:redirectResponse to a WebView, it just doesn't redirect at all. Is this a known bug? Do I have to write a web server to redirect someone to somewhere on tiger?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden