twz007 opened a new issue, #11059: URL: https://github.com/apache/dubbo/issues/11059
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy --> - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. ### Environment * Dubbo version: 3.1.1 * Operating System version: win10 * Java version: 1.8 ### Steps to reproduce this issue 1. 提供者声明 `dubbo.protocols.tri.contextpath: ${spring.application.name}` 2. 消费者以tri协议调用 `@DubboReference(protocol = "tri")` 3. 消费者收到报错 `org.apache.dubbo.rpc.StatusRpcException: UNIMPLEMENTED : Bad path format:/context-path/com.a.b/c` 定位报错代码处:`org.apache.dubbo.rpc.protocol.tri.stream.TripleServerStream.ServerTransportObserver#processHeader` ```java // ...... 省略 // path = /context-path/com.a.b/c String[] parts = path.split("/"); // parts.length = 4 报错 if (parts.length != 3) { responseErr(TriRpcStatus.UNIMPLEMENTED.withDescription("Bad path format:" + path)); return; } // ...... 省略 ``` 上述代码限制了长度一定为3,实际可能为4 Pls. provide [GitHub address] to reproduce this issue. ### Expected Behavior 兼容掉声明了context-path的情况 <!-- What do you expect from the above steps?--> ### Actual Behavior 未兼容 <!-- What actually happens? --> If there is an exception, please attach the exception trace: ``` Just put your stack trace here! ``` -- 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]
