[webkit-help] WebView willSendRequest: for WebSocket Handshake

Alexey Proskuryakov ap at webkit.org
Mon Nov 18 12:43:24 PST 2013


Hi Leo,

This is not currently supported. Please file a bug via bugs.webkit.org.

- WBR, Alexey Proskuryakov

18 нояб. 2013 г., в 11:46, Leo Franchi <lfranchi at kde.org> написал(а):

> Hello folks,
> 
> I'm embedding a WebView in my Cocoa application and using WebResourceLoadDelegate webView:willSendRequest:redirectResponse:fromDataSource. Specifically, I have an app that uses a WebView that I'd like to isolate cookie-wise from the system Safari/Webkit.
> 
> So far so good, I have code in willSendRequest that populates outgoing requests with cookies captured from webView:resource:didReceiveResponse. That seems to be working fine.
> 
> The issue I have is that when making a new WebSocket connection in JS, something like:
> 
> new WebSocket('wss://www.foo.com')
> 
> there is no corresponding call to willSendRequest: for the initial HTTP-part of the Upgrade request. This is an issue for me since it means I can't add my cookies to the request... I imagine somewhere internally in WebKit there's an NSURLRequest being created for this HTTP request but it's not getting passed through willSendRequest as for other XHRs of load requests from JS.
> 
> Does anyone have any ideas / pointers? I've been unable to figure out if there's any way for me to attach the proper cookies to this initial handshake.
> 
> cheers,
> leo
> 
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20131118/f35da97b/attachment.html>


More information about the webkit-help mailing list