You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/12/01 07:34:34 UTC

[GitHub] [dubbo] twz007 opened a new issue, #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] EarthChen commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1334677910

   > > > > > 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
   > > > 
   > > > * Make a protocol judgment on the configuration, ignore or report an error for triple
   > > > * The server is compatible, if there are 4 parts, ignore the first part
   > > 
   > > 
   > > Just ignore `context-path` when read `path` from url
   > 
   > Well, I agree, but need a log to let the user know.
   
   yep,Would you like to pr to fix it? 


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] guohao commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
guohao commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1333429852

   It is not a bug .
   `Path`  is  defined here https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md 
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] guohao commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
guohao commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1333567994

   > > > 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
   > 
   > * Make a protocol judgment on the configuration, ignore or report an error for triple
   > * The server is compatible, if there are 4 parts, ignore the first part
   
   Just ignore `context-path` when read `path` from url


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] twz007 commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
twz007 commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1334889160

   > > > > > > 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
   > > > > 
   > > > > * Make a protocol judgment on the configuration, ignore or report an error for triple
   > > > > * The server is compatible, if there are 4 parts, ignore the first part
   > > > 
   > > > 
   > > > Just ignore `context-path` when read `path` from url
   > > 
   > > 
   > > Well, 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.


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] EarthChen commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1333448091

   I would like to ask, what purpose do you want to use this configuration for?


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] twz007 commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
twz007 commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1333461971

   > It is not a bug . `Path` is defined here https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
   
   It seems that the triple design does not support context-path at the beginning.


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] twz007 commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
twz007 commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1334654019

   > > > > 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
   > > 
   > > * Make a protocol judgment on the configuration, ignore or report an error for triple
   > > * The server is compatible, if there are 4 parts, ignore the first part
   > 
   > Just ignore `context-path` when read `path` from url
   
   Well, I agree, but need a log to let the user know.


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] twz007 commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
twz007 commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1333465116

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


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] EarthChen commented on issue #11059: Provider export tri protocol with declare context-path, consumer got a "Bad path format xxx" exception

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #11059:
URL: https://github.com/apache/dubbo/issues/11059#issuecomment-1333507223

   > > 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
   - Make a protocol judgment on the configuration, ignore or report an error for triple
   - The server is compatible, if there are 4 parts, ignore the first part
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org