Skip to content

Commit 8d7c714

Browse files
authored
eos: use the correct app header on HTTP transfers (#5122)
1 parent 82fb7cb commit 8d7c714

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Bugfix: use the correct eos app header
2+
3+
https://github.com/cs3org/reva/pull/5122

pkg/eosclient/eosgrpc/eoshttp.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import (
3636
"github.com/cs3org/reva/pkg/logger"
3737
)
3838

39+
const EOS_APP_HEADER = "eos.app"
40+
3941
// HTTPOptions to configure the Client.
4042
type HTTPOptions struct {
4143

@@ -274,7 +276,7 @@ func (c *EOSHTTPClient) GETFile(ctx context.Context, remoteuser string, auth eos
274276
return nil, err
275277
}
276278
// similar to eosbinary.go::Read()
277-
req.Header.Set("app", "reva_eosclient::read")
279+
req.Header.Set(EOS_APP_HEADER, "reva_eosclient::read")
278280

279281
ntries := 0
280282
nredirs := 0
@@ -379,7 +381,7 @@ func (c *EOSHTTPClient) PUTFile(ctx context.Context, remoteuser string, auth eos
379381
}
380382

381383
if app != "" {
382-
req.Header.Set("app", app)
384+
req.Header.Set(EOS_APP_HEADER, app)
383385
}
384386
req.Close = true
385387

0 commit comments

Comments
 (0)