Add content-length as part of event notification structure (#6341)

Fixes #6321
This commit is contained in:
kannappanr
2018-08-23 14:40:54 -07:00
committed by GitHub
parent dafa5073cb
commit add57a6938
3 changed files with 41 additions and 25 deletions

View File

@@ -189,6 +189,15 @@ func extractReqParams(r *http.Request) map[string]string {
}
}
// Extract response elements to be sent with event notifiation.
func extractRespElements(w http.ResponseWriter) map[string]string {
return map[string]string{
"content-length": w.Header().Get("Content-Length"),
// Add more fields here.
}
}
// Trims away `aws-chunked` from the content-encoding header if present.
// Streaming signature clients can have custom content-encoding such as
// `aws-chunked,gzip` here we need to only save `gzip`.