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/03/14 09:00:36 UTC

[GitHub] [dubbo-go-hessian2] miracle-xiang opened a new issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

miracle-xiang opened a new issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311


   <!-- Please only use this template for submitting enhancement requests -->
   
   **What would you like to be added**:
   
   **Why is this needed**:
   - 目前发现个情况,argsTypes 类型推断为int32, 但是在解析该字段时,强行按照string进行了类型推断。
   - 导致 `panic[panic:interface conversion: interface {} is int32, not string [recovered]
           panic: interface conversion: interface {} is int32, not string]`
   
   - [值类型判断](https://github.com/apache/dubbo-go-hessian2/blob/master/decode.go#L273)
   - [值的解析](https://github.com/apache/dubbo-go-hessian2/blob/master/request.go#L316)
   


-- 
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-go-hessian2] wongoo edited a comment on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
wongoo edited a comment on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1080185035


   @miracle-xiang the dubbo version 2.8.4a seems not the official version, the protocol is incompatible. https://github.com/wongoo/dubbo-go-test/blob/cc71636a7b6678833271243b60ecbdada4521d3f/hessian_issue311/parse_dubbo_test.go#L43


-- 
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-go-hessian2] wongoo commented on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1069895504


   @miracle-xiang  there is an example that decoding data from java, u can create a new unit test:
   - https://github.com/apache/dubbo-go-hessian2/blob/c18594c8ecd05dbd953d68ab1fab03d4a1d6c6e5/test_hessian/src/main/java/test/TestCustomReply.java#L631
   - https://github.com/apache/dubbo-go-hessian2/blob/c18594c8ecd05dbd953d68ab1fab03d4a1d6c6e5/object_test.go#L946
   
   


-- 
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-go-hessian2] miracle-xiang edited a comment on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
miracle-xiang edited a comment on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1069824334


   - UT
   
   `
   func TestParseDubboHessian(t *testing.T) {
   	raw, _ := loadPcap("dubbo_req.pcap")
   
   	codecR := hessian2.NewHessianCodec(bufio.NewReader(bytes.NewReader(raw[108:])))
   	header := &hessian2.DubboHeader{}
   	err := codecR.ReadHeader(header)
   	if err != nil {
   		t.Errorf("read header err [%v]\n", err)
   	}
   
   	c := make([]interface{}, 7)
   	err = codecR.ReadBody(c)
   	if err != nil {
   		t.Errorf("read body err [%v]\n", err)
   	}
   }
   
   `
   
   
   
   


-- 
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-go-hessian2] wongoo commented on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1080185035


   @miracle-xiang the dubbo version 2.8.4a seems not the official version, the protocol is compatiable  https://github.com/wongoo/dubbo-go-test/blob/cc71636a7b6678833271243b60ecbdada4521d3f/hessian_issue311/parse_dubbo_test.go#L43


-- 
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-go-hessian2] miracle-xiang removed a comment on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
miracle-xiang removed a comment on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1069824334


   - UT
   
   `
   func TestParseDubboHessian(t *testing.T) {
   	raw, _ := loadPcap("dubbo_req.pcap")
   
   	codecR := hessian2.NewHessianCodec(bufio.NewReader(bytes.NewReader(raw[108:])))
   	header := &hessian2.DubboHeader{}
   	err := codecR.ReadHeader(header)
   	if err != nil {
   		t.Errorf("read header err [%v]\n", err)
   	}
   
   	c := make([]interface{}, 7)
   	err = codecR.ReadBody(c)
   	if err != nil {
   		t.Errorf("read body err [%v]\n", err)
   	}
   }
   
   `
   
   
   
   


-- 
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-go-hessian2] miracle-xiang commented on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
miracle-xiang commented on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1080126864


   您好, 麻烦您帮忙看下, 我的UT和PCAP。 dubbo-go-hessian2 tag v1.11.0
   
   [Downloads.zip](https://github.com/apache/dubbo-go-hessian2/files/8359261/Downloads.zip)
   
   
   我想参照`codecR.ReadBody`来解析body
   https://github.com/apache/dubbo-go-hessian2/blob/master/hessian_test.go#L177
   
   不使用java解码可以么?


-- 
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-go-hessian2] AlexStocks commented on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1080197945


   The dubbo version v2.8.4a belongs to dubbox which was maintained by DangDang before 2018. And then it was merged into dubbo 2.6. Now it has been out of date.


-- 
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-go-hessian2] wongoo commented on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1068671180


   @miracle-xiang pls provide more details, like golang struct definition, java object definition, your unit test, etc..


-- 
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-go-hessian2] miracle-xiang edited a comment on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
miracle-xiang edited a comment on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1069824334


   - UT
   
   `func TestParseDubboHessian(t *testing.T) {
   	raw, _ := loadPcap("dubbo_req.pcap")
   
   	codecR := hessian2.NewHessianCodec(bufio.NewReader(bytes.NewReader(raw[108:])))
   	header := &hessian2.DubboHeader{}
   	err := codecR.ReadHeader(header)
   	if err != nil {
   		t.Errorf("read header err [%v]\n", err)
   	}
   
   	c := make([]interface{}, 7)
   	err = codecR.ReadBody(c)
   	if err != nil {
   		t.Errorf("read body err [%v]\n", err)
   	}
   }`
   
   
   
   


-- 
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-go-hessian2] miracle-xiang commented on issue #311: dubboVersion为"2.8.4a" 可以使用该库解析吗?

Posted by GitBox <gi...@apache.org>.
miracle-xiang commented on issue #311:
URL: https://github.com/apache/dubbo-go-hessian2/issues/311#issuecomment-1069824334


   - UT
   
   `func TestParseDubboHessian(t *testing.T) {
   	raw, _ := loadPcap("dubbo_req.pcap")
   
   	codecR := hessian2.NewHessianCodec(bufio.NewReader(bytes.NewReader(raw[108:])))
   	header := &hessian2.DubboHeader{}
   	err := codecR.ReadHeader(header)
   	if err != nil {
   		t.Errorf("read header err [%v]\n", err)
   	}
   
   	c := make([]interface{}, 7)
   	err = codecR.ReadBody(c)
   	if err != nil {
   		t.Errorf("read body err [%v]\n", err)
   	}
   }`
   
   - panic信息
   
   `--- FAIL: TestParseDubboHessian (0.00s)
   panic: interface conversion: interface {} is int32, not string [recovered]
           panic: interface conversion: interface {} is int32, not string
   
   goroutine 25 [running]:
   testing.tRunner.func1.2({0xaa3fe0, 0xc0003da150})
           /usr/lib/golang/src/testing/testing.go:1209 +0x24e
   testing.tRunner.func1()
           /usr/lib/golang/src/testing/testing.go:1212 +0x218
   panic({0xaa3fe0, 0xc0003da150})
           /usr/lib/golang/src/runtime/panic.go:1038 +0x215
   github.com/apache/dubbo-go-hessian2.unpackRequestBody(0xc0003c4e60, {0xa54000, 0xc0003cad80})
           /home/xiangwang/go/src/gitlab.yunshan.net/platform/trident/vendor/github.com/apache/dubbo-go-hessian2/request.go:322 +0xbeb
   github.com/apache/dubbo-go-hessian2.(*HessianCodec).ReadBody(0xc000090e98, {0xa54000, 0xc0003cad80})
           /home/xiangwang/go/src/gitlab.yunshan.net/platform/trident/vendor/github.com/apache/dubbo-go-hessian2/hessian.go:200 +0x185
   gitlab.yunshan.net/platform/trident/flowgenerator/rpc/dubbo.TestParseDubboHessian(0xc0003ac4e0)
           /home/xiangwang/go/src/gitlab.yunshan.net/platform/trident/flowgenerator/rpc/dubbo/flow_dubbo_log_test.go:39 +0x2a5
   testing.tRunner(0xc0003ac4e0, 0xbba1d8)
           /usr/lib/golang/src/testing/testing.go:1259 +0x102
   created by testing.(*T).Run
           /usr/lib/golang/src/testing/testing.go:1306 +0x35a`
   
   


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