object: fix signed payload calculation of HeadRequest message

In previous implementation first byte of buffer for HeadRequest
signed payload was set to 1 if FullHeaders flag was set. Otherwise,
this byte remained unchanged. For correct recording of a signed payload,
it is necessary to explicitly set the first byte with the unset flag.
This commit is contained in:
Leonard Lyubich 2020-05-18 12:48:04 +03:00
parent 2c571718d0
commit 1931bd590d
2 changed files with 23 additions and 15 deletions

View file

@ -82,6 +82,8 @@ func (m HeadRequest) ReadSignedData(p []byte) (int, error) {
if m.GetFullHeaders() {
p[0] = 1
} else {
p[0] = 0
}
off := 1