Created attachment 467066 [details] Image showing TCP connection created again for another POST On any version of wpewebkit, carrying out multiple POST fetch request does not reuse the TCP connection and instead creates a new connection for each request. This occurs on wpewebkit 2.22, 2.28, and epiphany browser running WebKitGTK 2.38.6 For example with: fetch('https://reqres.in/api/articles', { method: "POST", body: JSON.stringify({ title: 'Fetch POST Request Example' }) }); On Chrome two calls to the above code reuse the connection from the first call. On wpewebkit it is not reused. [See image] It is my understanding that persistent connections should be used here because the request and response headers have connection: keep-alive. Persistent connections should keep the TCP connection so that other fetches to the url can reuse the connection. Question: Should multiple POST fetch requests reuse their connection like in Chrome or create a new connection for each request as seen? Thanks.
Can you confirm that this is built with libsoup2 or libsoup3 and what version of libsoup? Also does the website use HTTP/2 or HTTP/1.1 (you can enable the Protocol column in the inspector). This issue is could be one of libsoup and not WPE. Also maybe a real world example that you can find is helpful. Just testing it in the wild here (with libsoup 3 and HTTP/2) and the connection was shared.
This is built with libsoup2 version 2.62.3. Looking at the inspector the website is using HTTP/1.1 as request states: POST /stg/v1.0/create-authcode HTTP/1.1 and response states: HTTP/1.1 200 OK I'll see if I can find real world example and update. Thanks.
Ah I can confirm that libsoup does not share for POST requests: https://gitlab.gnome.org/GNOME/libsoup/-/blob/d1509188ebd2219db1a147e9d77ffd5b4d161a2e/libsoup/soup-connection-manager.c#L399 I think this issue should be moved there.
Thanks for the very quick and valuable feedback, I'll move to libsoup. Kind regards.