mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Signature-V4: Include content-length for signature calculation. (#2643)
This is to be compatible with clients which includes content-length for signature calculation (and hence deviating from AWS Signature-v4 spec)
This commit is contained in:
committed by
Harshavardhana
parent
a4afb312d4
commit
400e9309f1
13
cmd/utils.go
13
cmd/utils.go
@@ -21,6 +21,7 @@ import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@@ -30,6 +31,18 @@ import (
|
||||
"github.com/pkg/profile"
|
||||
)
|
||||
|
||||
// make a copy of http.Header
|
||||
func cloneHeader(h http.Header) http.Header {
|
||||
h2 := make(http.Header, len(h))
|
||||
for k, vv := range h {
|
||||
vv2 := make([]string, len(vv))
|
||||
copy(vv2, vv)
|
||||
h2[k] = vv2
|
||||
|
||||
}
|
||||
return h2
|
||||
}
|
||||
|
||||
// xmlDecoder provide decoded value in xml.
|
||||
func xmlDecoder(body io.Reader, v interface{}, size int64) error {
|
||||
var lbody io.Reader
|
||||
|
||||
Reference in New Issue
Block a user