Alanxtl opened a new pull request, #3446:
URL: https://github.com/apache/dubbo-go/pull/3446
## What changed
- Store the unary handler connection in the handler context before invoking
user logic.
- Add a regression test that calls `triple.SetHeader` and
`triple.SetTrailer` from a unary handler and verifies the client receives both
values.
## Why
`SetHeader` and `SetTrailer` require `handlerOutgoingKey{}` in the handler
context to access the current `StreamingHandlerConn`. The unary handler path
only injected incoming metadata, so generated unary service implementations
could not use the documented response metadata APIs.
Closes #3444.
## Validation
```bash
go test ./protocol/triple/triple_protocol -run
TestSetHeaderAndSetTrailerInUnaryHandler -count=1
go test ./protocol/triple/triple_protocol
go test ./protocol/triple
```
--
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]