ywxzm03 opened a new pull request, #155:
URL: https://github.com/apache/dubbo-go-pixiu-samples/pull/155

   **What this PR does**:
   
   - Fixes the grpcproxy descriptor path configuration in the `http/grpc` 
sample so it points to the actual proto directory, instead of the non-existent 
`samples/http/grpc/pixiu/proto`.
   
   - Adds a negative test for invalid JSON request bodies in 
`http/grpc/test/pixiu_test.go`, verifying that grpcproxy returns `502 Bad 
Gateway` when HTTP JSON cannot be converted into a protobuf request, instead of 
continuing with a successful response.
   
   **Which issue(s) this PR fixes**:
   Fixes #145
   
   **Special notes for your reviewer**:
   
   This PR keeps the fix focused on two issues directly related to the 
`http/grpc` sample:
   
   - Fix the descriptor path so the sample configuration matches the repository 
layout.
   - Add an invalid JSON request test to cover the JSON -> protobuf conversion 
failure path.
   
   This PR does not add assertions for `unsupported method`, `unknown path`, or 
`wrong service prefix` for the following reasons:
   
   - In the `http -> grpc` scenario, the incoming HTTP method does not have a 
strict one-to-one mapping to the final gRPC method, so `unsupported method` is 
not clearly applicable here. gRPC is transported over HTTP/2 POST, and in this 
`http -> grpc` flow, `GET` / `POST` / `PUT` / `DELETE` HTTP requests may all 
call the same gRPC service as long as the URL resolves to the same 
service/method.
   - For `unknown path` and `wrong service prefix`, I think the test scope is 
too broad and not necessary for this PR.
   - (Please correct me if this understanding is wrong)
   
   **Does this PR introduce a user-facing change?**:
   
   ```release-note
   None


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to