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

Bill Patterson billpatt at aol.com
Fri Oct 10 20:58:24 PDT 2008


That's the way it works for the NSURLConnection willSendRequest.  When  
I tried that in the webView willSendRequest it causes a crash.

I haven't looked at the source code, but I just downloaded it to do so.

Thanks,

Bill

On Oct 10, 2008, at 4:26 PM, Darin Adler wrote:

> 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