Bug #77938 [Ver->Csd]: socket_get_option error
| From: | cmb@php.net | Date: | Wed, 24 Apr 2019 22:09:09 +0000 |
| Subject: | Bug #77938 [Ver->Csd]: socket_get_option error | ||
| References: | 1 | Groups: | php.bugs php.qa |
| Request: | Send a blank email to php-bugs+get-220597@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77938&edit=1
ID: 77938
Updated by: cmb@php.net
Reported by: v-altruo at microsoft dot com
Summary: socket_get_option error
-Status: Verified
+Status: Closed
Type: Bug
Package: Testing related
Operating System: Windows
PHP Version: 7.2.18RC1
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fe202d99c8fff957509375411641687f47dfc17b
Log: Fix #77938: socket_get_option error
Previous Comments:
------------------------------------------------------------------------
[2019-04-24 22:03:19] cmb@php.net
Thanks for reporting! As requinix said, the test has to be fixed
to cater to the recently introduced HTTPS redirect of www.php.net
(the warning is suppressed due to the @ operator).
------------------------------------------------------------------------
[2019-04-24 21:11:38] requinix@php.net
Warning: socket_import_stream(): cannot represent a stream of type tcp_socket/ssl as a Socket
Descriptor
Broken by the new HTTPS redirect. Adding
"http" => ["follow_location" => 0]
to the options array works.
------------------------------------------------------------------------
[2019-04-24 21:07:43] v-altruo at microsoft dot com
Description:
------------
Failed regardless of OPCache being enabled or disabled and if it was TS or NTS.
Test file location: ext\standard\tests\stream\stream_context_tcp_nodelay_fopen.phpt
Test script:
---------------
$ctxt = stream_context_create([
"socket" => [
"tcp_nodelay" => true
]
]);
$stream = fopen("http://www.php.net",
"r", false, $ctxt);
$socket =
@socket_import_stream($stream);
var_dump(socket_get_option($socket, STREAM_IPPROTO_TCP, TCP_NODELAY) > 0);
Expected result:
----------------
bool(true)
Actual result:
--------------
Warning: socket_get_option() expects parameter 1 to be resource, boolean given in...
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77938&edit=1