• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WebView NSURLProtocol Tiger problems.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >WebView NSURLProtocol Tiger problems. (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: Re: Resizable NSTabView
  • Next by Date: Re: init method ambiguity
  • Previous by thread: WebView NSURLProtocol Tiger problems.
  • Next by thread: What does: IKImageView setOverlay method ?
  • Index(es):
    • Date
    • Thread