[webkit-help] WebView willSendRequest: for WebSocket Handshake
lfranchi at kde.org
Mon Nov 18 11:46:18 PST 2013
I'm embedding a WebView in my Cocoa application and using
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,
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-help