[Webkit-unassigned] [Bug 231880] [GTK][WPE] Support setting status code and getting HTTP method in custom URI scheme handlers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 20 01:03:55 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231880

--- Comment #9 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to liushuyu011 from comment #8)
> > Why do you need to get the HTTP method? custom uri schemes are not actually HTTP, so only GET is supported.
> 
> Sorry, I may not understand this correctly. I would like to know what would
> happen when the web application makes an XHR or fetch() request to the
> custom scheme URI? Will it return an error when the method specified is not
> "GET"? (Currently, I am getting CORS errors with any XHR requests)

I don't know, that's a good point. It would be a great to have a unit test for this.

> >  c) add WebKitURISchemeResponse + webkit_uri_scheme_request_finish_with_response(). 
> 
> Yeah, I think this is better. However, I am not sure how to approach this?
> Shouldn't I place a `WebKitURISchemeResponse` type field inside
> `WebKitURISchemeRequest` as well since it's a callback function? I would
> imagine it needs to be here to temporarily store the response struct before
> `webkitURISchemeRequestReadCallback` is called?

We need to add a new object WebKitURISchemeResponse with api to set the response properties (stream, content length, content type, status code and text). The user would have to create an instance before calling webkit_uri_request_finish_with_response and pass it as argument.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211020/170d008f/attachment-0001.htm>


More information about the webkit-unassigned mailing list