swoole / swoole-src

🚀 Coroutine-based concurrency library for PHP
https://www.swoole.com
Apache License 2.0
18.25k stars 3.16k forks source link

Swoole not supporting partitioned cookie parameter #5309

Open Energetic6877 opened 2 weeks ago

Energetic6877 commented 2 weeks ago

Please answer these questions before submitting your issue.

  1. What did you do? If possible, provide a simple script for reproducing the error.

I created an basic laravel application and activated partitioned cookies.

composer create-project laravel/laravel ReproducePartitionedIssue
cd ReproducePartitionedIssue
echo "SESSION_PARTITIONED_COOKIE=true" >> .env
echo "SESSION_SECURE_COOKIE=true" >> .env
echo "SESSION_SAMESITE=None" >> .env
php artisan serve

When I know curl with curl -I http://127.0.0.1:8000 or open in chrome the cookies have the partitioned attribute.

Now I installed octane.

composer require laravel/octane
php artisan octane:install --server=swoole
php artisan octane:start

When I know curl with curl -I http://127.0.0.1:8000 or open in chrome the partitioned attribute is missing.

  1. What did you expect to see? This is the response using plain php or roadrunner. Screenshot from 2024-04-30 12-10-14

  2. What did you see instead? With swoole the partitioned key is missing. Screenshot from 2024-04-30 12-10-42

  3. What version of Swoole are you using (show your php --ri swoole)?

    
    swoole

Swoole => enabled Author => Swoole Team team@swoole.com Version => 5.1.2 Built => Apr 30 2024 10:02:52 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled http2 => enabled json => enabled curl-native => enabled pcre => enabled zlib => 1.3.1 brotli => E16781312/D16781312 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled coroutine_pgsql => enabled

Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_fiber_mock => Off => Off swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608


5. What is your machine environment used (show your `uname -a` & `php -v` & `gcc -v`) ?
```bash
$ uname -a 
Linux XXX 6.6.29-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 27 Apr 2024 18:43:45 +0000 x86_64 GNU/Linux
$ php -v
PHP 8.3.6 (cli) (built: Apr 12 2024 12:24:08) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies
$ gcc -v 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++ --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.1 20240417 (GCC)
NathanFreeman commented 2 weeks ago

see https://github.com/swoole/swoole-src/pull/5310