You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you do? If possible, provide a simple script for reproducing the error.
I was trying to migrate from imefisto/psr-swoole-native to OpenSwoole PSR-7 and started using
$server->setHandler($app)
What did you expect to see?
I expected everything to work but seems like all the middlewares I use (third party) expect getServerParams keys to be uppercase. Openswoole sets them lowercase. I haven't found any specification to be uppercase but the interface stats:
/** * Retrieve server parameters. * * Retrieves data related to the incoming request environment, * typically derived from PHP's $_SERVER superglobal. The data IS NOT * REQUIRED to originate from $_SERVER. * * @return array */public function getServerParams();
And since $_SERVER keys are uppercase, I would say this is an error in Openswoole.
What version of OpenSwoole are you using (show your php --ri openswoole)?
# php --ri openswoole
openswoole
Open Swoole => enabled
Author => Open Swoole Group <[email protected]>
Version => 22.1.2
Built => Dec 10 2023 21:17:21
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
spinlock => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 1.1.1w 11 Sep 2023
dtls => enabled
http2 => enabled
hook-curl => enabled
pcre => enabled
zlib => 1.2.12
brotli => E16777225/D16777225
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => enabled
postgresql => enabled
Directive => Local Value => Master Value
openswoole.enable_coroutine => On => On
openswoole.enable_preemptive_scheduler => Off => Off
openswoole.display_errors => On => On
openswoole.unixsock_buffer_size => 8388608 => 8388608
What is your machine environment used (show your uname -a & php -v & gcc -v) ?
Docker image openswoole/swoole:22.1-php8.2-alpine with some adds
# uname -a && php -v && gcc -v
Linux 8156544c9d25 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 Linux
PHP 8.2.0 (cli) (built: Dec 8 2022 20:14:26) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.0, Copyright (c) Zend Technologies
sh: gcc: not found
The text was updated successfully, but these errors were encountered:
I was trying to migrate from imefisto/psr-swoole-native to OpenSwoole PSR-7 and started using
I expected everything to work but seems like all the middlewares I use (third party) expect
getServerParams
keys to beuppercase
. Openswoole sets themlowercase
. I haven't found any specification to beuppercase
but the interface stats:And since
$_SERVER
keys areuppercase
, I would say this is an error in Openswoole.php --ri openswoole
)?uname -a
&php -v
&gcc -v
) ?Docker image
openswoole/swoole:22.1-php8.2-alpine
with some addsThe text was updated successfully, but these errors were encountered: