Skip to content
Snippets Groups Projects
Commit 66c23337 authored by fangyincheng's avatar fangyincheng
Browse files

Fix: attachments

parent 639aab65
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,4 @@ const (
CONF_CONSUMER_FILE_PATH = "CONF_CONSUMER_FILE_PATH"
CONF_PROVIDER_FILE_PATH = "CONF_PROVIDER_FILE_PATH"
APP_LOG_CONF_FILE string = "APP_LOG_CONF_FILE"
DUBBO_VERSION_KEY = "dubbo"
DUBBO_VERSION = "2.0.2"
)
......@@ -43,7 +43,8 @@ func (ef *EchoFilter) Invoke(invoker protocol.Invoker, invocation protocol.Invoc
logger.Debugf("%v,%v", invocation.MethodName(), len(invocation.Arguments()))
if invocation.MethodName() == constant.ECHO && len(invocation.Arguments()) == 1 {
return &protocol.RPCResult{
Rest: invocation.Arguments()[0],
Rest: invocation.Arguments()[0],
Attrs: invocation.Attachments(),
}
}
......
......@@ -4,7 +4,7 @@ require (
github.com/Workiva/go-datastructures v1.0.50
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e // indirect
github.com/apache/dubbo-go-hessian2 v1.2.5-0.20190902124655-28e15207c962
github.com/apache/dubbo-go-hessian2 v1.2.5-0.20190909140437-80cbb25cbb22
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 // indirect
github.com/coreos/bbolt v1.3.3 // indirect
github.com/coreos/etcd v3.3.13+incompatible
......
......@@ -35,8 +35,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e h1:MSuLXx/mveDbpDNhVrcWTMeV4lbYWKcyO4rH+jAxmX0=
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ=
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/apache/dubbo-go-hessian2 v1.2.5-0.20190902124655-28e15207c962 h1:Nnlrk3rPLHkw0HO0zIf80a+bRaarKYyiDeouyMErMC4=
github.com/apache/dubbo-go-hessian2 v1.2.5-0.20190902124655-28e15207c962/go.mod h1:LWnndnrFXZmJLAzoyNAPNHSIJ1KOHVkTSsHgC3YYWlo=
github.com/apache/dubbo-go-hessian2 v1.2.5-0.20190909140437-80cbb25cbb22 h1:Ku+3LFRYVelgo/INS9893QOUeIiKNeNKzK3CzDcqt/4=
github.com/apache/dubbo-go-hessian2 v1.2.5-0.20190909140437-80cbb25cbb22/go.mod h1:LWnndnrFXZmJLAzoyNAPNHSIJ1KOHVkTSsHgC3YYWlo=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
......
......@@ -56,10 +56,6 @@ func (di *DubboInvoker) Invoke(invocation protocol.Invocation) protocol.Result {
result protocol.RPCResult
)
if invocation.Attachments() != nil {
invocation.Attachments()[constant.DUBBO_VERSION_KEY] = constant.DUBBO_VERSION
}
inv := invocation.(*invocation_impl.RPCInvocation)
url := di.GetUrl()
// async
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment