mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 22:16:15 +03:00
Add text/event-stream for long running http connections (#7909)
When MinIO is behind a proxy, proxies end up killing clients when no data is seen on the connection, adding the right content-type ensures that proxies do not come in the way.
This commit is contained in:
@@ -540,6 +540,7 @@ func (s *storageRESTServer) VerifyFile(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
algo := BitrotAlgorithmFromString(algoStr)
|
||||
w.Header().Set(xhttp.ContentType, "text/event-stream")
|
||||
doneCh := sendWhiteSpaceVerifyFile(w)
|
||||
err = s.storage.VerifyFile(volume, filePath, algo, hash, int64(shardSize))
|
||||
<-doneCh
|
||||
|
||||
Reference in New Issue
Block a user