AlexStocks commented on code in PR #931:
URL: https://github.com/apache/dubbo-go-pixiu/pull/931#discussion_r3254210335


##########
pkg/filter/mcp/mcpserver/handlers.go:
##########
@@ -613,6 +613,7 @@ func (f *MCPServerFilter) sendMCPResponse(ctx *MCPContext, 
response mcp.JSONRPCR
        ctx.TargetResp = &client.UnaryResponse{Data: mcpResponseBody}
        ctx.StatusCode(http.StatusOK)
        ctx.AddHeader(constant.HeaderKeyContextType, 
constant.HeaderValueApplicationJson)
+       ctx.ClearContentLengthHeader()

Review Comment:
   [P1] 这个修复点没有配套回归测试。`Content-Length` 不匹配是典型的协议层回归问题,后续重构时这一行很容易再次被删掉。建议在 
`mcpserver` 里补一个针对 `sendMCPResponse` 的测试,明确断言包装 backend response 后会清掉 
`Content-Length`。



-- 
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