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.
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
5. 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
```bash
# 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
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
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 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.What did you see instead?
What version of OpenSwoole are you using (show your
php --ri openswoole
)?openswoole
Open Swoole => enabled Author => Open Swoole Group hello@openswoole.com 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