Skip to content
Permalink
Browse files
[WPE][GTK] Bogus Response.{status,ok} for successful fetch() requests…
… to a custom URI scheme handler

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

Reviewed by Carlos Garcia Campos.

No new tests needed.

* UIProcess/API/glib/WebKitURISchemeRequest.cpp:
(webkitURISchemeRequestReadCallback): Mark response as having status "200 OK" when
webkit_uri_scheme_request_finish() gets passed a GInputStream.


Canonical link: https://commits.webkit.org/234664@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aperezdc committed Feb 27, 2021
1 parent 0f761a7 commit e2e1867
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
@@ -1,3 +1,16 @@
2021-02-26 Adrian Perez de Castro <aperez@igalia.com>

[WPE][GTK] Bogus Response.{status,ok} for successful fetch() requests to a custom URI scheme handler
https://bugs.webkit.org/show_bug.cgi?id=222471

Reviewed by Carlos Garcia Campos.

No new tests needed.

* UIProcess/API/glib/WebKitURISchemeRequest.cpp:
(webkitURISchemeRequestReadCallback): Mark response as having status "200 OK" when
webkit_uri_scheme_request_finish() gets passed a GInputStream.

2021-02-26 Peng Liu <peng.liu6@apple.com>

[GPUP] Replace references to GPUProcessConnection and Connection with WeakPtr<GPUProcessConnection>
@@ -180,6 +180,8 @@ static void webkitURISchemeRequestReadCallback(GInputStream* inputStream, GAsync
if (!priv->bytesRead) {
ResourceResponse response(priv->task->request().url(), extractMIMETypeFromMediaType(priv->contentType.data()), priv->streamLength, emptyString());
response.setTextEncodingName(extractCharsetFromMediaType(priv->contentType.data()));
response.setHTTPStatusCode(200);
response.setHTTPStatusText("OK"_s);
if (response.mimeType().isEmpty())
response.setMimeType(MIMETypeRegistry::mimeTypeForPath(response.url().path().toString()));
priv->task->didReceiveResponse(response);

0 comments on commit e2e1867

Please sign in to comment.