[webkit-dev] Cancel a URL request from a webview

Darin Adler darin at apple.com
Fri Oct 10 14:26:10 PDT 2008

On Oct 9, 2008, at 11:47 PM, Bill Patterson wrote:

> I need a means to cancel a URL request from a webview, preferably in  
> the  
> webView:resource:willSendRequest:redirectResponse:fromDataSource:  
> delegate.

If you return nil, WebKit will cancel the request.

> I need to do this because I need access to the NSURLConnection  
> delegates to handle a redirected URL, which doesn't seem possible in  
> the webview delegate.

Are you sure? Which delegates specifically? Have you looked at the  
WebKit source code to see how it handles this NSURLConnection delegate?

If this isn't possible, I suspect it's a bug.

     -- Darin

More information about the webkit-dev mailing list