mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
HTTP API: Update Requests.
This introduces a minimum value of 1 second for timeouts passed to cURL. Internally, cURL uses alarm() for interrupts, which accepts a second-resolution timeout. Any values lower than 1 second are instantly failed rather than being rounded upwards. While this makes the experience worse for those using asynchronous DNS lookups, there's no way to detect which DNS resolver is being used from PHP. See #33055, #8923. git-svn-id: https://develop.svn.wordpress.org/trunk@37694 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -304,6 +304,8 @@ class Requests {
|
||||
* options:
|
||||
*
|
||||
* - `timeout`: How long should we wait for a response?
|
||||
* Note: for cURL, a minimum of 1 second applies, as DNS resolution
|
||||
* operates at second-resolution only.
|
||||
* (float, seconds with a millisecond precision, default: 10, example: 0.01)
|
||||
* - `connect_timeout`: How long should we wait while trying to connect?
|
||||
* (float, seconds with a millisecond precision, default: 10, example: 0.01)
|
||||
|
||||
Reference in New Issue
Block a user