From c59d2a628806e52c3f2081ec87eae7610fc668ef Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Mon, 2 May 2022 10:37:26 -0700 Subject: [PATCH] Log Range Header if present in the request (#14851) Add Range header as param to easier debug of Range requests. --- cmd/handler-utils.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/handler-utils.go b/cmd/handler-utils.go index 793fb88ff..a6b2c32ea 100644 --- a/cmd/handler-utils.go +++ b/cmd/handler-utils.go @@ -237,6 +237,10 @@ func extractReqParams(r *http.Request) map[string]string { "sourceIPAddress": handlers.GetSourceIP(r), // Add more fields here. } + if rangeField := r.Header.Get(xhttp.Range); rangeField != "" { + m["range"] = rangeField + } + if _, ok := r.Header[xhttp.MinIOSourceReplicationRequest]; ok { m[xhttp.MinIOSourceReplicationRequest] = "" }