<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>263720</bug_id>
          
          <creation_ts>2023-10-26 07:31:07 -0700</creation_ts>
          <short_desc>[GTK][WPE] http/tests/security/redirect-BLOCKED-to-localURL.html is crashing</short_desc>
          <delta_ts>2026-04-17 03:30:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>DoNotImportToRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Amanda Falke">abstractmachines</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>fujii</cc>
    
    <cc>kkinnunen</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1987717</commentid>
    <comment_count>0</comment_count>
    <who name="Amanda Falke">abstractmachines</who>
    <bug_when>2023-10-26 07:31:07 -0700</bug_when>
    <thetext>This test is crashing in the GTK port. The WPE bots are completely down and have been for weeks, so no way to tell how those bots would be handling this test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2142066</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-09-10 00:07:12 -0700</bug_when>
    <thetext>Thread 1 (Thread 0x7f3a01df36c0 (LWP 77039)):
#0  g_log_structured_array (log_level=log_level@entry=G_LOG_LEVEL_ERROR, fields=fields@entry=0x7f3a01df2620, n_fields=3) at ../glib/gmessages.c:431
#1  0x00007f3afac59ec7 in g_log_default_handler (log_domain=log_domain@entry=0x0, log_level=log_level@entry=6, message=message@entry=0x7f3b01ef1d80 &quot;WebProcess didn&apos;t exit as expected after the UI process connection was closed&quot;, unused_data=unused_data@entry=0x0) at ../glib/gmessages.c:3436
#2  0x00007f3afac54477 in g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=&lt;optimized out&gt;, args=args@entry=0x7f3a01df2780) at ../glib/gmessages.c:1260
#3  0x00007f3afac54803 in g_log (log_domain=&lt;optimized out&gt;, log_level=&lt;optimized out&gt;, format=&lt;optimized out&gt;) at ../glib/gmessages.c:1329
#4  0x00007f3afbbf17c9 in WTF::Detail::CallableWrapper&lt;WebKit::crashAfter10Seconds(IPC::Connection*)::{lambda()#1}, void&gt;::call() () at /home/fujii/webkit/wd/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1
#5  0x00007f3afd9116ff in WTF::Detail::CallableWrapper&lt;WTF::RunLoop::dispatchAfter(WTF::Seconds, WTF::Function&lt;void ()&gt;&amp;&amp;)::{lambda()#1}, void&gt;::call() () at /home/fujii/webkit/wd/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1
#6  0x00007f3afd9f3fcd in WTF::RunLoop::TimerBase::TimerBase(WTF::Ref&lt;WTF::RunLoop, WTF::RawPtrTraits&lt;WTF::RunLoop&gt;, WTF::DefaultRefDerefTraits&lt;WTF::RunLoop&gt; &gt;&amp;&amp;, WTF::ASCIILiteral)::{lambda(void*)#1}::_FUN(void*) () at /home/fujii/webkit/wd/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1
#7  0x00007f3afd9f4ae9 in WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) () at /home/fujii/webkit/wd/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1
#8  0x00007f3afac4e863 in g_main_dispatch (context=0x7f3a5c005f90) at ../glib/gmain.c:3398
#9  g_main_context_dispatch_unlocked (context=0x7f3a5c005f90) at ../glib/gmain.c:4249
#10 0x00007f3afac577a8 in g_main_context_iterate_unlocked (context=0x7f3a5c005f90, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at ../glib/gmain.c:4314
#11 0x00007f3afac57a4f in g_main_loop_run (loop=0x7f3a5c0029e0) at ../glib/gmain.c:4516
#12 0x00007f3afd9f52d0 in WTF::RunLoop::run() () at /home/fujii/webkit/wd/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1
#13 0x00007f3afd97f8a7 in WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) () at /home/fujii/webkit/wd/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1
#14 0x00007f3afd9f95c9 in WTF::wtfThreadEntryPoint(void*) () at /home/fujii/webkit/wd/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1
#15 0x00007f3afa391f54 in start_thread (arg=&lt;optimized out&gt;) at pthread_create.c:448
#16 0x00007f3afa41532c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2168539</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-12-29 20:13:01 -0800</bug_when>
    <thetext>History: https://results.webkit.org/?suite=layout-tests&amp;test=http%2Ftests%2Fsecurity%2Fredirect-BLOCKED-to-localURL.html&amp;platform=GTK&amp;platform=WPE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200489</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2026-04-14 21:07:43 -0700</bug_when>
    <thetext>MESSAGE_CHECK_URL(process, error.failingURL()) was failed in WebPageProxy::didFailProvisionalLoadForFrameShared.
error.failingURL() was &quot;file:///tmp/LayoutTests/http/tests/security/resources/file-redirect-target.html&quot;.

Then, Connection::dispatchMessage calls didReceiveInvalidMessage().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200500</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2026-04-14 22:18:11 -0700</bug_when>
    <thetext>On Mac port, both provisionalURL and error.failingURL() were &quot;http://127.0.0.1:8000/resources/redirect.py?url=file:///tmp/LayoutTests/http/tests/security/resources/file-redirect-target.html&quot;.

On GTK port, provisionalURL was &quot;http://127.0.0.1:8000/resources/redirect.py?url=file:///tmp/LayoutTests/http/tests/security/resources/file-redirect-target.html&quot;
but, error.failingURL() was &quot;file:///tmp/LayoutTests/http/tests/security/resources/file-redirect-target.html&quot;./</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200975</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2026-04-16 00:23:25 -0700</bug_when>
    <thetext>Added a debug logging to Mac port, and ran the layout test case,

diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
index 6fdf5fb788e6..052e4429179d 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
@@ -400,6 +400,10 @@ void NetworkDataTaskCocoa::didNegotiateModernTLS(const URL&amp; url)
 
 void NetworkDataTaskCocoa::didCompleteWithError(const WebCore::ResourceError&amp; error, const WebCore::NetworkLoadMetrics&amp; networkLoadMetrics)
 {
+    WTF_ALWAYS_LOG(__FUNCTION__ &lt;&lt; &quot;:&quot; &lt;&lt; __LINE__ &lt;&lt; &quot; &quot; &lt;&lt; error.domain());
+    WTF_ALWAYS_LOG(__FUNCTION__ &lt;&lt; &quot;:&quot; &lt;&lt; __LINE__ &lt;&lt; &quot; &quot; &lt;&lt; error.errorCode());
+    WTF_ALWAYS_LOG(__FUNCTION__ &lt;&lt; &quot;:&quot; &lt;&lt; __LINE__ &lt;&lt; &quot; &quot; &lt;&lt; error.failingURL());
+    WTF_ALWAYS_LOG(__FUNCTION__ &lt;&lt; &quot;:&quot; &lt;&lt; __LINE__ &lt;&lt; &quot; &quot; &lt;&lt; error.localizedDescription());
     WTFEmitSignpost(m_task.get(), DataTask, &quot;completed with error: %d&quot;, !error.isNull());
 
     if (RefPtr client = m_client.get())


I got the following log:

&gt; didCompleteWithError:403 NSURLErrorDomain
&gt; didCompleteWithError:404 -1102
&gt; didCompleteWithError:405 http://127.0.0.1:8000/resources/redirect.py?url=file:///tmp/LayoutTests/http/tests/security/resources/file-redirect-target.html
&gt; didCompleteWithError:406 You do not have permission to access the requested resource.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2201366</commentid>
    <comment_count>6</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2026-04-16 21:20:03 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/62951</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2201446</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-17 03:30:06 -0700</bug_when>
    <thetext>Committed 311441@main (fcd1bae99608): &lt;https://commits.webkit.org/311441@main&gt;

Reviewed commits have been landed. Closing PR #62951 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>