Mod: comment
diff --git a/const.go b/const.go
index 1a5a796..6d51f67 100644
--- a/const.go
+++ b/const.go
@@ -200,6 +200,7 @@
FLAG_EVENT = byte(0x20) // for heartbeat
SERIAL_MASK = 0x1f
+ DUBBO_VERSION = "2.5.4"
DUBBO_VERSION_KEY = "dubbo"
DEFAULT_DUBBO_PROTOCOL_VERSION = "2.0.2" // Dubbo RPC protocol version, for compatibility, it must not be between 2.0.10 ~ 2.6.2
LOWEST_VERSION_FOR_RESPONSE_ATTACHMENT = 2000200
diff --git a/request.go b/request.go
index 5722b44..968372d 100644
--- a/request.go
+++ b/request.go
@@ -219,9 +219,8 @@
goto END
}
+ // https://github.com/apache/dubbo/blob/dubbo-2.7.1/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeChannel.java#L92
// dubbo version + path + version + method
- // org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeChannel
- // v2.7.1 Line 92
encoder.Encode(DEFAULT_DUBBO_PROTOCOL_VERSION)
encoder.Encode(service.Path)
encoder.Encode(service.Version)
diff --git a/response.go b/response.go
index 17f3528..a1f68ff 100644
--- a/response.go
+++ b/response.go
@@ -58,8 +58,7 @@
return NewResponse(body, nil, nil)
}
-// dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/codec/ExchangeCodec.java
-// v2.7.1 line 256 encodeResponse
+// https://github.com/apache/dubbo/blob/dubbo-2.7.1/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java#L256
// hessian encode response
func packResponse(header DubboHeader, ret interface{}) ([]byte, error) {
var (
@@ -332,10 +331,8 @@
var versionInt = make(map[string]int)
+// https://github.com/apache/dubbo/blob/dubbo-2.7.1/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java#L96
// isSupportResponseAttachment is for compatibility among some dubbo version
-// but we haven't used it yet.
-// dubbo-common/src/main/java/org/apache/dubbo/common/Version.java
-// v2.7.1 line 96
func isSupportResponseAttachment(version string) bool {
if version == "" {
return false