You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "az2az (via GitHub)" <gi...@apache.org> on 2024/08/06 10:22:27 UTC

[I] 代理Http请求,变量名自动进行驼峰转换问题 [dubbo-go]

az2az opened a new issue, #2725:
URL: https://github.com/apache/dubbo-go/issues/2725

   ### Environment
   
   <!-- 
   - Server: Dubbo-go, v3.2.0
   - Client: Dubbo-go, v3.2.0
   - Protocol: Triple
   - Registry: Nacos, v2.0.0
   -->
   
   - Server: 
   - Client: 
   - Protocol: 
   - Registry: 
   
   ### Issue description
   
   当使用3.2.0,直接代理http请求转发到后端的triple协议服务,会出现将变量名自动进行驼峰转换的问题。而直接使用triple协议调用后端的triple协议服务,则不会出现此问题。跟踪了一下源码,发现在下图这里没有设置MarshalOptions。
   
   ![BD44A5CF-7DA5-4E57-98C0-AF7DF5A11852](https://github.com/user-attachments/assets/bf6bdc14-e75e-4fe1-8617-ae4f5329b970)
   
   
   请社区考虑增加可配置的选项,或者默认加上如下语句,让两端统一,都不应该进行驼峰转换。
   
   ![123](https://github.com/user-attachments/assets/688ba701-7d03-4c0d-a011-7ca33b19e4fb)
   
   
   ### Logs
   
   <details><summary>Click me to check logs</summary>
   
   ```
   Copy logs to here.
   ```
   
   </details>
   


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


Re: [I] 代理Http请求,变量名自动进行驼峰转换问题 [dubbo-go]

Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on issue #2725:
URL: https://github.com/apache/dubbo-go/issues/2725#issuecomment-2727374080

   Go 语言要求 public func 必须 Upper case 开始


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


Re: [I] 代理Http请求,变量名自动进行驼峰转换问题 [dubbo-go]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on issue #2725:
URL: https://github.com/apache/dubbo-go/issues/2725#issuecomment-2728490438

   > > Go 语言要求 public func 必须 Upper case 开始
   > 
   > 所以在dubbo协议下存在 java 和 go 通信时有不兼容的情况 可能需要添加一些描述定义字段来处理这种情况
   
   dubbo 协议是有tag 可以修改实际请求的方法名的
   
   ```go
   GetUser  func(ctx context.Context, req int32) (*User, error) `dubbo:"getUser"`
   ```


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


Re: [I] 代理Http请求,变量名自动进行驼峰转换问题 [dubbo-go]

Posted by "qiubyte (via GitHub)" <gi...@apache.org>.
qiubyte commented on issue #2725:
URL: https://github.com/apache/dubbo-go/issues/2725#issuecomment-2727834467

   > Go 语言要求 public func 必须 Upper case 开始
   
   所以在dubbo协议下存在 java 和 go 通信时有不兼容的情况
   可能需要添加一些描述定义字段来处理这种情况


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


Re: [I] 代理Http请求,变量名自动进行驼峰转换问题 [dubbo-go]

Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks closed issue #2725: 代理Http请求,变量名自动进行驼峰转换问题
URL: https://github.com/apache/dubbo-go/issues/2725


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


Re: [I] 代理Http请求,变量名自动进行驼峰转换问题 [dubbo-go]

Posted by "qiubyte (via GitHub)" <gi...@apache.org>.
qiubyte commented on issue #2725:
URL: https://github.com/apache/dubbo-go/issues/2725#issuecomment-2728531448

   > > > Go 语言要求 public func 必须 Upper case 开始
   > > 
   > > 
   > > 所以在dubbo协议下存在 java 和 go 通信时有不兼容的情况 可能需要添加一些描述定义字段来处理这种情况
   > 
   > dubbo 协议是有tag 可以修改实际请求的方法名的
   > 
   > GetUser  func(ctx context.Context, req int32) (*User, error) `dubbo:"getUser"`
   
   thx,搜到了这个示例,我验证下


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


Re: [I] 代理Http请求,变量名自动进行驼峰转换问题 [dubbo-go]

Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on issue #2725:
URL: https://github.com/apache/dubbo-go/issues/2725#issuecomment-2516384115

   怎么复现能描述下吗


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


Re: [I] 代理Http请求,变量名自动进行驼峰转换问题 [dubbo-go]

Posted by "qiubyte (via GitHub)" <gi...@apache.org>.
qiubyte commented on issue #2725:
URL: https://github.com/apache/dubbo-go/issues/2725#issuecomment-2716749607

   dubbo 协议也会出现这个问题, 
   版本
   java: dubbo3.3.0,
   go:v3.2.0
   
   步骤:
   1. java server仅使用dubbo协议,方法名首字母小写
   2. go client配置`client.WithClientProtocolDubbo()`,同样方法名,首字母大写
   3. go调用java失败,java端抛异常找不到method
   4. 切换使用triple协议`client.WithClientProtocolTriple()`,调用是正常的
   


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