Bug 232653 - [GTK][WPE] Support getting and setting HTTP headers in custom URI scheme handlers
Summary: [GTK][WPE] Support getting and setting HTTP headers in custom URI scheme hand...
Status: RESOLVED DUPLICATE of bug 203273
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: All Linux
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-02 19:39 PDT by liushuyu011
Modified: 2021-11-04 03:05 PDT (History)
7 users (show)

See Also:


Attachments
Patch (14.67 KB, patch)
2021-11-02 19:44 PDT, liushuyu011
no flags Details | Formatted Diff | Diff
Patch (15.34 KB, patch)
2021-11-02 21:48 PDT, liushuyu011
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description liushuyu011 2021-11-02 19:39:22 PDT
This is a continuation of https://bugs.webkit.org/show_bug.cgi?id=231880.

Currently, there is no way for the URI scheme handler to get or set the HTTP headers.
As the last patch has proven, the URI scheme handler should also be considered to be HTTP-compliant since `fetch` or `XHR` calls to the URI scheme handler contains full HTTP information.

Those functionalities are necessary, because:
* The same functionality already exists in the macOS version of the WebKit implementation (by manipulating `NSHTTPURLResponse` and/or `NSHTTPURLRequest`)
* Could eliminate the usage of a local server: this could ease the development of semi-native apps, especially in the embedded environment
* Existing workaround to get HTTP headers from URI scheme is unreliable (see the bug report below)
* There are already feature requests for this: https://bugs.webkit.org/show_bug.cgi?id=231564

After this patch is landed, https://bugs.webkit.org/show_bug.cgi?id=231564 will be completely fixed.
Comment 1 liushuyu011 2021-11-02 19:44:55 PDT
Created attachment 443165 [details]
Patch
Comment 2 EWS Watchlist 2021-11-02 19:45:41 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 https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 liushuyu011 2021-11-02 21:48:28 PDT
Created attachment 443172 [details]
Patch
Comment 4 Michael Catanzaro 2021-11-03 08:07:20 PDT
I'm confused by so many different bug reports for very similar issues.

Isn't this a duplicate of bug #203273?

And also of bug #231564, asides from that bug's reference to methods, which you already solved in bug #231880?

I would mark both this and bug #231564 as duplicates of bug #203273, and continue there, so we only have one bug report to deal with. Do you agree?
Comment 5 liushuyu011 2021-11-03 15:36:09 PDT
(In reply to Michael Catanzaro from comment #4)
> I'm confused by so many different bug reports for very similar issues.
> 
> Isn't this a duplicate of bug #203273?
> 
> And also of bug #231564, asides from that bug's reference to methods, which
> you already solved in bug #231880?
> 
> I would mark both this and bug #231564 as duplicates of bug #203273, and
> continue there, so we only have one bug report to deal with. Do you agree?

Sorry for the confusion. If this bug report is marked duplicate, what would happen to the patch review?
Comment 6 Michael Catanzaro 2021-11-03 16:12:57 PDT
Just upload it again in the bug that is not closed!
Comment 7 liushuyu011 2021-11-03 17:41:02 PDT
(In reply to Michael Catanzaro from comment #6)
> Just upload it again in the bug that is not closed!

Thank you, I will mark this bug as a duplicate.

*** This bug has been marked as a duplicate of bug 203273 ***