WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
123428
[SOUP][GTK][WK2] Need API to get SoupSession from WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=123428
Summary
[SOUP][GTK][WK2] Need API to get SoupSession from WebKit2.
Andre Moreira Magalhaes
Reported
2013-10-28 17:25:04 PDT
webkit1 gtk has an API to get the default SoupSession which would be useful for extensions on webkit2. The API can be used for example to set proxy settings directly on the SoupSession from extensions (which run in the WebProcess). Patch to come next.
Attachments
Patch
(7.68 KB, patch)
2013-10-28 17:37 PDT
,
Andre Moreira Magalhaes
no flags
Details
Formatted Diff
Diff
Patch
(8.40 KB, patch)
2013-10-29 06:39 PDT
,
Andre Moreira Magalhaes
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Andre Moreira Magalhaes
Comment 1
2013-10-28 17:37:05 PDT
Created
attachment 215352
[details]
Patch Add webkit_get_default_session API to wk2.
Andre Moreira Magalhaes
Comment 2
2013-10-29 06:39:33 PDT
Created
attachment 215384
[details]
Patch Fix build issues with documentation.
WebKit Commit Bot
Comment 3
2013-10-29 06:41:04 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Carlos Garcia Campos
Comment 4
2013-10-29 06:45:55 PDT
We have tried to provide API in webkit for different network features (custom uri schemes, authentication, etc.) instead of exposing the SoupSession. Would it be possible to add API (if actually required) to set proxy settings?
Carlos Garcia Campos
Comment 5
2013-10-29 06:46:22 PDT
Note that this might now work anymore if we switch to use the network process.
Dan Winship
Comment 6
2013-10-29 06:52:37 PDT
It depends how complicated the app wants to get with its proxy settings...
Andre Moreira Magalhaes
Comment 7
2013-10-29 07:31:56 PDT
(In reply to
comment #4
)
> We have tried to provide API in webkit for different network features (custom uri schemes, authentication, etc.) instead of exposing the SoupSession. Would it be possible to add API (if actually required) to set proxy settings?
You mean an API for web-extension (Web Process) or a webview/context API (UI Process)? If for the extension we could easily add a webkit_set_proxy_resolver(GProxyResolver*) instead of exposing the SoupSession. If you mean an API for webview/context we would have to pass the info all the way to the Web Process, and I am not sure how flexible this would be. I believe exposing the SoupSession has other advantages where the user can tweak the session to their needs more easily. I wasn't aware of this switch to network process though.
Carlos Garcia Campos
Comment 8
2013-10-29 07:40:28 PDT
(In reply to
comment #7
)
> (In reply to
comment #4
) > > We have tried to provide API in webkit for different network features (custom uri schemes, authentication, etc.) instead of exposing the SoupSession. Would it be possible to add API (if actually required) to set proxy settings? > > You mean an API for web-extension (Web Process) or a webview/context API (UI Process)?
For the UI process would be better, that way it will work even if we switch to network process or implement multi-web-process support.
> If for the extension we could easily add a webkit_set_proxy_resolver(GProxyResolver*) instead of exposing the SoupSession. If you mean an API for webview/context we would have to pass the info all the way to the Web Process, and I am not sure how flexible this would be.
It's what we do for custom uri schemes, cookies, disk cache, http auth, etc.
> I believe exposing the SoupSession has other advantages where the user can tweak the session to their needs more easily.
what other things do you need to tweak?
> I wasn't aware of this switch to network process though.
Well, it's not even supported yet, but we might eventually switch.
Andre Moreira Magalhaes
Comment 9
2013-10-30 05:37:13 PDT
(In reply to
comment #8
)
> (In reply to
comment #7
) > > (In reply to
comment #4
) > > > We have tried to provide API in webkit for different network features (custom uri schemes, authentication, etc.) instead of exposing the SoupSession. Would it be possible to add API (if actually required) to set proxy settings? > > > > You mean an API for web-extension (Web Process) or a webview/context API (UI Process)? > > For the UI process would be better, that way it will work even if we switch to network process or implement multi-web-process support. >
Indeed, I agree, just not sure how to support for example custom GProxyResolver in this case.
> > If for the extension we could easily add a webkit_set_proxy_resolver(GProxyResolver*) instead of exposing the SoupSession. If you mean an API for webview/context we would have to pass the info all the way to the Web Process, and I am not sure how flexible this would be. > > It's what we do for custom uri schemes, cookies, disk cache, http auth, etc. > > > I believe exposing the SoupSession has other advantages where the user can tweak the session to their needs more easily. > > what other things do you need to tweak? >
I mean that you would have more flexibility here, anything available in the SoupSession could be easily tweaked to the user liking. But yeah, with the possibility of switching to network process this patch makes no sense.
> > I wasn't aware of this switch to network process though. > > Well, it's not even supported yet, but we might eventually switch.
Got it. Thanks for the comments, I will close here as WONTFIX as I won't have time to work on a proper patch for the UIProcess API.
Csaba Osztrogonác
Comment 10
2013-11-05 09:12:54 PST
Comment on
attachment 215384
[details]
Patch Cleared review? from
attachment 215384
[details]
so that this bug does not appear in
http://webkit.org/pending-review
. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug