browserviewcontroller
browserviewcontroller copied to clipboard
Error in BrowserViewController.m
Hi,
First of all, thanks for sharing this code.
I think there might be a small mistake in the connection:willSendRequest:redirectResponse: method of BrowserViewController.m (unless I'm misunderstanding its functionality). I believe that line 473 can be removed and line 474 should be: self.currentURL = [request URL];
If you check the docs (http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/connection:willSendRequest:redirectResponse:), it looks like the response object contains the URL you're being redirected from - not to. Hence, [response URL] would be one step back in the redirect chain.
Feel free to correct me if I'm in error there!
Oliver MagicSolver.com