Skip to content

Commit

Permalink
Fix #3212
Browse files Browse the repository at this point in the history
(cherry picked from commit 7dadfeb)
  • Loading branch information
twose committed Mar 31, 2020
1 parent d11bfb2 commit 6188cb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion swoole_http_client_coro.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ static PHP_METHOD(swoole_http_client_coro, setHeaders)
zval *headers;

ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_ARRAY(headers)
Z_PARAM_ARRAY_EX(headers, 0, 1)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);

zend_update_property(swoole_http_client_coro_ce, ZEND_THIS, ZEND_STRL("requestHeaders"), headers);
Expand Down
1 change: 1 addition & 0 deletions tests/swoole_http_client_coro/websocket.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ $pm->parentFunc = function ($pid) use ($pm) {
go(function () use ($pm) {
$cli = new Co\http\Client('127.0.0.1', $pm->getFreePort());
$cli->set(['timeout' => -1]);
$cli->setHeaders([]);
$ret = $cli->upgrade('/');

if (!$ret)
Expand Down

0 comments on commit 6188cb9

Please sign in to comment.