Bug #80851 [NEW]: https doesn't respect stream context option http.timeout -1

From: Date: Wed, 10 Mar 2021 12:56:15 +0000
Subject: Bug #80851 [NEW]: https doesn't respect stream context option http.timeout -1
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232644@lists.php.net to get a copy of this message
From: athorcis at yahoo dot fr Operating system: ALL PHP version: Irrelevant Package: HTTP related Bug Type: Bug Bug description:https doesn't respect stream context option http.timeout -1 Description: ------------ When trying to access an HTTPS URL through streams if the HTTP timeout is set to a negative value then the function fails with the following warnings: Warning: file_get_contents(): SSL: Handshake timed out in Command line code on line 1 Warning: file_get_contents(): Failed to enable crypto in Command line code on line 1 Warning: file_get_contents(https://www.google.fr/): failed to open stream: operation failed in Command line code on line 1 I reproduced the error on Debian but also on Windows using these versions: 5.4, 5.5, 5.6 and 7.4 Test script: --------------- file_get_contents('https://www.google.fr/', false, stream_context_create(['http' => ['timeout' => -1]])); Expected result: ---------------- The options http.timeout -1 si suppose to prevent timeout errors not cause them Actual result: -------------- The options http.timeout -1 cause an a timeout error with https streams -- Edit bug report at https://bugs.php.net/bug.php?id=80851&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80851&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80851&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80851&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80851&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80851&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80851&r=support Expected behavior: https://bugs.php.net/fix.php?id=80851&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80851&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80851&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80851&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80851&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80851&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80851&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80851&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80851&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80851&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80851&r=mysqlcfg

« previous php.bugs (#232644) next »