From d7524cbe01e017a6f346f64d18aee3922b56a656 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 26 Oct 2023 03:16:09 +0300 Subject: [PATCH] fix MessageMetadata option Signed-off-by: Vasiliy Tolstov --- go.mod | 2 +- go.sum | 10 ++-------- http.go | 6 ++++++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 4f0bd11..2c64390 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module go.unistack.org/micro-client-http/v3 go 1.18 -require go.unistack.org/micro/v3 v3.10.16 +require go.unistack.org/micro/v3 v3.10.28 diff --git a/go.sum b/go.sum index af3467d..7e2c165 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,2 @@ -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/silas/dag v0.0.0-20211117232152-9d50aa809f35/go.mod h1:7RTUFBdIRC9nZ7/3RyRNH1bdqIShrDejd1YbLwgPS+I= -go.unistack.org/micro/v3 v3.10.16 h1:2er/SKKYbV60M+UuJM4eYCF0MZYAIq/yNUrAbTfgq8Q= -go.unistack.org/micro/v3 v3.10.16/go.mod h1:uMAc0U/x7dmtICCrblGf0ZLgYegu3VwQAquu+OFCw1Q= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +go.unistack.org/micro/v3 v3.10.28 h1:/87lGekrmi0/66pioy+Nh8lVUBBYnVqKoHiNYX5OmMI= +go.unistack.org/micro/v3 v3.10.28/go.mod h1:eUgtvbtiiz6te93m0ZdmoecbitWwjdBmmr84srmEIKA= diff --git a/http.go b/http.go index bb2d0dd..67a8e92 100644 --- a/http.go +++ b/http.go @@ -649,6 +649,12 @@ func (h *httpClient) publish(ctx context.Context, ps []client.Message, opts ...c md := metadata.Copy(omd) md[metadata.HeaderContentType] = p.ContentType() + iter := p.Metadata().Iterator() + var k, v string + for iter.Next(&k, &v) { + md.Set(k, v) + } + // passed in raw data if d, ok := p.Payload().(*codec.Frame); ok { body = d.Data -- 2.45.2