-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update version for Swoole 4.4.25 (#4137)
* Fix httpclient proxy with host and port (#4124) * Fix proxy with host and port * Change strstr to memchr # Conflicts: # swoole_http_client_coro.cc * Update version for Swoole 4.4.25
- Loading branch information
Showing
5 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,10 +42,10 @@ | |
<email>[email protected]</email> | ||
<active>yes</active> | ||
</developer> | ||
<date>2021-03-09</date> | ||
<time>20:00:00</time> | ||
<date>2021-04-08</date> | ||
<time>10:00:00</time> | ||
<version> | ||
<release>4.4.24</release> | ||
<release>4.4.25</release> | ||
<api>4.0</api> | ||
</version> | ||
<stability> | ||
|
@@ -56,7 +56,7 @@ | |
<notes> | ||
Fixed | ||
--- | ||
* Fix crash when http2 client connects concurrently | ||
* Fix httpclient proxy with host and port | ||
</notes> | ||
<contents> | ||
<dir name="/"> | ||
|
@@ -1052,6 +1052,7 @@ | |
<file role="test" name="tests/swoole_http_client_coro/host.phpt" /> | ||
<file role="test" name="tests/swoole_http_client_coro/http_proxy.phpt" /> | ||
<file role="test" name="tests/swoole_http_client_coro/http_proxy_443.phpt" /> | ||
<file role="test" name="tests/swoole_http_client_coro/http_proxy_with_host_port.phpt" /> | ||
<file role="test" name="tests/swoole_http_client_coro/http_upload_big.phpt" /> | ||
<file role="test" name="tests/swoole_http_client_coro/https.phpt" /> | ||
<file role="test" name="tests/swoole_http_client_coro/https_upload_big.phpt" /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
tests/swoole_http_client_coro/http_proxy_with_host_port.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--TEST-- | ||
swoole_http_client_coro: http client with http_proxy and host and port | ||
--SKIPIF-- | ||
<?php | ||
require __DIR__.'/../include/skipif.inc'; | ||
?> | ||
--FILE-- | ||
<?php | ||
require __DIR__.'/../include/bootstrap.php'; | ||
|
||
$pm = new SwooleTest\ProcessManager; | ||
$pm->parentFunc = function () use ($pm) { | ||
Co\run(function () use ($pm) { | ||
$cli = new Swoole\Coroutine\Http\Client('127.0.0.1', 1234); | ||
$cli->set([ | ||
'timeout' => 30, | ||
'http_proxy_host' => '127.0.0.1', | ||
'http_proxy_port' => $pm->getFreePort(), | ||
]); | ||
$cli->setHeaders([ | ||
'Host' => '127.0.0.1:1234', | ||
]); | ||
$cli->get('/'); | ||
$pm->kill(); | ||
}); | ||
}; | ||
|
||
$pm->childFunc = function () use ($pm) { | ||
$server = new Swoole\Server('0.0.0.0', $pm->getFreePort(), SWOOLE_BASE); | ||
$server->set([ | ||
'log_file' => '/dev/null', | ||
'open_eof_check' => true, | ||
'package_eof' => "\r\n\r\n", | ||
]); | ||
$server->on('Receive', function ($server, $fd, $reactor_id, $data) { | ||
echo $data; | ||
$server->close($fd); | ||
}); | ||
$server->start(); | ||
}; | ||
|
||
$pm->childFirst(); | ||
$pm->run(); | ||
|
||
?> | ||
--EXPECT-- | ||
GET http://127.0.0.1:1234/ HTTP/1.1 | ||
Host: 127.0.0.1:1234 | ||
Connection: keep-alive | ||
Accept-Encoding: gzip, deflate |