[BUG] hyperf use http pool will exist response's set-cookie header will effect next request (hyperf3使用http连接池时会存在响应的set-cookie头影响下一个请求的cookie)
- Dominant language
- PHP
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 4h 21m
- Merged PRs (30d)
- 4
Description
Execute the command and paste the result below.
Command: `uname -a && php -v && composer info | grep hyperf && php --ri swoole`
Linux afde940d0691 6.10.4-linuxkit #1 SMP Wed Oct 2 16:38:00 UTC 2024 aarch64 GNU/Linux
PHP 8.1.30 (cli) (built: Nov 12 2024 08:13:36) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.30, Copyright (c) Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
swoole
Swoole => enabled
Author => Swoole Team
Version => 5.0.2
Built => Nov 23 2024 09:47:57
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 3.0.15 3 Sep 2024
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
c-ares => 1.18.1
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608
```bash
# Paste the result here.
```
### Description:
first request
GET /test HTTP/1.1
Host: www.test.com
Content-Type: application/json
User-Agent: GuzzleHttp/7 ; PHP/8.1.30 ; Framework/Hyperf 3
Content-Length: 0
Connection: keep-alive
first response
HTTP/1.1 200 OK
Server: nginx/1.27.2
Date: Thu, 12 Dec 2024 11:10:35 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
X-Powered-By: PHP/8.0.30
Set-Cookie: cookie_test=cookie_test; expires=Thu, 12-Dec-2024 12:10:35 GMT; Max-Age=3600
Connection: keep-alive
{"bbbb":"bbbb"}
second request
GET /test HTTP/1.1
Host: www.test.com
Content-Type: application/json
User-Agent: GuzzleHttp/7 ; PHP/8.1.30 ; Framework/Hyperf 3
**Cookie: cookie_test=cookie_test**
Content-Length: 0
Connection: keep-alive
first response's set-cookie cookie_test will be sent by second request , and i tried more fifty methods to delete it , but I failed
(第一次响应的set-cookie cookie_test 会被第二请求时发送,我尝试了超过50种方法去删除,但是不行)
### Steps To Reproduce:
Contributor guide
Assessment
This issue has not been assessed yet.