RESOLVED FIXED 277204
REGRESSION [GTK][WPE] navigating to empty file:// URL ends up in download
https://bugs.webkit.org/show_bug.cgi?id=277204
Summary REGRESSION [GTK][WPE] navigating to empty file:// URL ends up in download
Max Schmitt
Reported 2024-07-27 05:29:27 PDT
Created attachment 471981 [details] What Playwright uses for now When compiling WebKit with glib 2.76+ which includes https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3053 zero-size file:// resources will end up in a download instead of getting loaded. Before glib 2.76 they were loaded which matches Safari / Chromium behaviour. This affects: - JHBuild on Ubuntu 24.04 - Flatpak builds We as Playwright would love to upstream a change similar to the attachment, probably by adding it to `MIMETypeRegistry::supportedNonImageMIMETypes()` which seems like a better place. Could someone help me where to put a test for that? I didn't find a reasonable LayoutTest, they seem all http:// based.
Attachments
What Playwright uses for now (630 bytes, patch)
2024-07-27 05:29 PDT, Max Schmitt
no flags
Max Schmitt
Comment 1 2024-09-12 14:53:32 PDT
We added a workaround on our side in our embedder: static gboolean response_policy_decision_can_show(WebKitResponsePolicyDecision *responseDecision) { if (webkit_response_policy_decision_is_mime_type_supported(responseDecision)) return TRUE; const gchar* mimeType = webkit_uri_response_get_mime_type(webkit_response_policy_decision_get_response(responseDecision)); if (!mimeType || mimeType[0] == '\0') return FALSE; // https://bugs.webkit.org/show_bug.cgi?id=277204 / Ubuntu 24.04 / glib 2.76+ or higher if (g_ascii_strcasecmp(mimeType, "application/x-zerosize") == 0) return TRUE; return FALSE; }
Note You need to log in before you can comment on or make changes to this bug.