File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,20 @@ public function testUploadKilobyteSecure()
7878 $ this ->assertNotEquals ('' , $ buffer );
7979 }
8080
81- public function testUploadBiggerBlockSecureRequiresSmallerChunkSize ()
81+ public function testUploadBiggerBlockSecure ()
8282 {
83- $ size = 50 * 1000 ;
83+ // A few dozen kilobytes should be enough to verify this works.
84+ // Underlying buffer sizes are platform-specific, so let's increase this
85+ // a bit to trigger different behavior on Linux vs Mac OS X.
86+ $ size = 136 * 1000 ;
87+
8488 $ stream = stream_socket_client ('tls://httpbin.org:443 ' );
8589
90+ // PHP < 7.1.4 (and PHP < 7.0.18) suffers from a bug when writing big
91+ // chunks of data over TLS streams at once.
92+ // We work around this by limiting the write chunk size to 8192 bytes
93+ // here to also support older PHP versions.
94+ // See https://github.com/reactphp/socket/issues/105
8695 $ loop = Factory::create ();
8796 $ stream = new DuplexResourceStream (
8897 $ stream ,
You can’t perform that action at this time.
0 commit comments