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@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-help

Reply via email to