Conversation
future resolving immediately
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d513b09309
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| // Safety: There's a safety warning in the `SyncTonicBody` struct's constructor. | ||
| unsafe impl Sync for SyncTonicBody {} |
There was a problem hiding this comment.
Remove unsound
Sync impl for tonic body wrapper
SyncTonicBody is marked Sync even though it wraps tonic::body::Body, which is intentionally not Sync; this bypasses Rust’s thread-safety guarantees and can lead to undefined behavior on multithreaded runtimes if the body is shared across threads (or if tonic internals change). This should be implemented without asserting Sync manually (for example by using an unsync body path) rather than relying on unchecked unsafe.
Useful? React with 👍 / 👎.
| biased; | ||
|
|
||
| response = &mut call_future => { | ||
| let (response_parts, _) = response?.into_parts(); |
There was a problem hiding this comment.
Preserve short-circuit grpc-web responses instead of dropping body
When GrpcWebLayer handles a request without forwarding to the inner service, this branch keeps only status/headers and discards the returned body; Ferron then synthesizes its own generic response body later, which changes grpc-web/cors behavior and can break clients expecting the layer-generated payload. Returning the full response here avoids losing protocol-specific content.
Useful? React with 👍 / 👎.
This pull request would add a module that translates gRPC-Web requests into gRPC.
This module can be useful for exposing gRPC APIs when the clients only support HTTP. gRPC-Web would act as a bridge between HTTP clients and gRPC backends.