Log Range Header if present in the request (#14851)

Add Range header as param to easier debug of Range requests.
This commit is contained in:
Klaus Post 2022-05-02 10:37:26 -07:00 committed by GitHub
parent 3e3ff2a70b
commit c59d2a6288
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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] = ""
}