[wp-trac] [WordPress Trac] #50491: Loopback request fails if headers set in curl

WordPress Trac noreply at wordpress.org
Sat Jun 27 22:17:23 UTC 2020


#50491: Loopback request fails if headers set in curl
--------------------------+------------------------------
 Reporter:  atrixminerva  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  HTTP API      |     Version:  5.4.2
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => close


Comment:

 Hi there, welcome to WordPress Trac! Thanks for the report.

 As far as I know, this does not happen on a clean WordPress install, only
 if a plugin or theme starts a PHP session with a `session_start()`
 function call.

 A solution would be to close the session by `session_write_close()` before
 making any HTTP requests.

 See #47320 and #43358 for more details.

 WordPress 5.5 will have a Site Health test for any active PHP session as a
 possible reason for HTTP requests timing out, added in [47585] / #47320.

 Note that [https://github.com/rmccue/Requests Requests is an external
 library], so changing it in the proposed way is not a viable option, any
 suggestions would need to be submitted upstream.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50491#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list