commit: fa848ebfa7a0d7ed447cc123d71339c37720416e
parent: 0c1c413bb9a7e46b2c43ddf487ba73ece39e697b
author: Chris Noxz <chris@noxz.tech>
date: Fri, 10 Mar 2023 14:18:32 +0100
add fix for 204 (No content), not being ignored
This is discussed in an old bug report:
https://bugs.webkit.org/show_bug.cgi?id=60206
1 file changed, 11 insertions(+)
diff --git a/browser.h b/browser.h
@@ -461,8 +461,19 @@ cb_wv_decide_policy(WebKitWebView *web_view, WebKitPolicyDecision *decision,
(void)web_view;
(void)data;
+ /* only handle policy decisions */
if (type != WEBKIT_POLICY_DECISION_TYPE_RESPONSE)
return FALSE;
+ /* check if: 'HTTP/1.1 204 No Content'
+ * this should be ignored, but isn't
+ * see: https://bugs.webkit.org/show_bug.cgi?id=60206
+ * */
+ else if (webkit_uri_response_get_status_code(
+ webkit_response_policy_decision_get_response(
+ WEBKIT_RESPONSE_POLICY_DECISION(decision))) == 204
+ )
+ webkit_policy_decision_ignore(decision);
+ /* continue as normal */
else if (!webkit_response_policy_decision_is_mime_type_supported(
WEBKIT_RESPONSE_POLICY_DECISION(decision))
)