-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
协程风格的 HTTP 服务器解析 Content-Type 为 application/x-www-form-urlencoded 的 POST 参数不符合预期 #4475
Labels
Comments
补充: |
无法重现你的问题 |
并不是每次都会出现这个情况,属于偶现,但是机率超过 50%。 |
请尝试如下 2 种方式,即可复现: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please answer these questions before submitting your issue. Thanks!
php 7.2.3 + swoole 4.6.7 和 php 7.4.25 + swoole 4.8.1 均存在此问题。
客户端代码:
给服务端发送一个只包含 1 个 test 参数的 Content-Type 为 application/x-www-form-urlencoded 的 POST 请求,参数的值是 1000 个 你好 拼接在一起,参数值做了 urlencode。
服务端代码:
没有正确解析 test 参数, 返回了 2 个参数,多出来的第 2 个参数的 key 看起来像是 test 参数值的一部分,并且每次测试的结果不同,第 2 个参数的 key 是随机无规律变化的。
php --ri swoole
)?php 7.2.3 + swoole 4.6.7
php 7.4.25 + swoole 4.8.1
uname -a
&php -v
&gcc -v
) ?uname -a
Linux xtgmipc 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
php -v
gcc -v
The text was updated successfully, but these errors were encountered: