- I have searched the 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
- 提供者声明
dubbo.protocols.tri.contextpath: ${spring.application.name}
- 消费者以tri协议调用
@DubboReference(protocol = "tri")
- 消费者收到报错
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
// ...... 省略
// 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的情况
Actual Behavior
未兼容
If there is an exception, please attach the exception trace:
Just put your stack trace here!
9条答案
按热度按时间ktecyv1j1#
It is not a bug .
Path
is defined here https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.mdwlwcrazw2#
I would like to ask, what purpose do you want to use this configuration for?
c7rzv4ha3#
It is not a bug .
Path
is defined here https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.mdIt seems that the triple design does not support context-path at the beginning.
xnifntxz4#
I would like to ask, what purpose do you want to use this configuration for?
Some of our old services initially only supported jsonrpc, http, and rest protocols. The simple way is to directly modify the protocol to triple without deleting the context-path.
sauutmhj5#
I would like to ask, what purpose do you want to use this configuration for?
Some of our old services initially only supported jsonrpc, http, and rest protocols. The simple way is to directly modify the protocol to triple without deleting the context-path.
It seems that there are two solutions
kqlmhetl6#
I would like to ask, what purpose do you want to use this configuration for?
Some of our old services initially only supported jsonrpc, http, and rest protocols. The simple way is to directly modify the protocol to triple without deleting the context-path.
It seems that there are two solutions
Just ignore
context-path
when readpath
from url3phpmpom7#
I would like to ask, what purpose do you want to use this configuration for?
Some of our old services initially only supported jsonrpc, http, and rest protocols. The simple way is to directly modify the protocol to triple without deleting the context-path.
It seems that there are two solutions
Just ignore
context-path
when readpath
from urlWell, I agree, but need a log to let the user know.
b5lpy0ml8#
I would like to ask, what purpose do you want to use this configuration for?
Some of our old services initially only supported jsonrpc, http, and rest protocols. The simple way is to directly modify the protocol to triple without deleting the context-path.
It seems that there are two solutions
Just ignore
context-path
when readpath
from urlWell, I agree, but need a log to let the user know.
yep,Would you like to pr to fix it?
zxlwwiss9#
I would like to ask, what purpose do you want to use this configuration for?
Some of our old services initially only supported jsonrpc, http, and rest protocols. The simple way is to directly modify the protocol to triple without deleting the context-path.
It seems that there are two solutions
Just ignore
context-path
when readpath
from urlWell, I agree, but need a log to let the user know.
yep,Would you like to pr to fix it?
ok,I will fix it.