fix MessageMetadata option

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-10-26 03:16:09 +03:00
parent 0e7b8e73a8
commit d7524cbe01
3 changed files with 9 additions and 9 deletions

View File

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