-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
[🐛 BUG]: marshal_payload: string field contains invalid UTF-8 #2104
Comments
Hey @GityaMan 👋🏻
|
I am using the latest version: 2024.3.1 |
Good, please, attach relevant debug logs as well and check that you use latest versions of the relevant php packages (worker, http, etc). |
|
I'm not sure we should support non-utf-8 symbols. What is the use-case? UTF-8 nowadays is like 99.9% of used characters set. |
Ignoring such data will work for me. |
The response code 400 is more appropriate for the current situation in my opinion. |
Let me check how PHP is compatible with the string/bytes protobuf types (how they're represented in PHP). Because to support the non-utf-8 characters we need to send bytes to PHP, not strings. |
https://github.com/protocolbuffers/protobuf/tree/main/php%2Fsrc%2FGoogle%2FProtobuf There are several implementations of prootbuf in php, both in PHP and as extensions written in C. Need to check something specific? |
Yeah, I know. Currently, cookies are represented as a hashmap in our protocol. As you may see, we use strings. Strings are UTF-8 only (this is why you see that error). To support |
Hey, @rustatian . |
Hey @GityaMan 👋🏻 |
Ok, so, yeah, bytes/string is a single string type in PHP when compiled from protobuf. |
vendor/spiral/roadrunner-http/src/HttpWorker.php:71 |
DTO was changed, wait for the PHP part release. |
You need to update composer deps, especially roadrunner-api-dto. |
Thank you, now everything works! |
No duplicates 🥲.
What happened?
Updating to 2024.1 breaks some http requests that worked previously.
Version (rr --version)
2024.1+ (protobuf)
How to reproduce the issue?
Send a request with some invalid data. For example, an invalid third-party cookie. We get 500 status code.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: