fix: avoid buffering of server sent events by proxies (#10164)

This commit is contained in:
Harshavardhana
2020-07-30 19:45:12 -07:00
committed by GitHub
parent fe157166ca
commit 25a55bae6f
5 changed files with 25 additions and 13 deletions

View File

@@ -2615,7 +2615,9 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite
w.Write(encodedErrorResponse)
w.(http.Flusher).Flush()
}
w.Header().Set(xhttp.ContentType, "text/event-stream")
setEventStreamHeaders(w)
w = &whiteSpaceWriter{ResponseWriter: w, Flusher: w.(http.Flusher)}
completeDoneCh := sendWhiteSpace(w)
objInfo, err := completeMultiPartUpload(ctx, bucket, object, uploadID, completeParts, opts)