simplify site replication multipart proxying (#19885)

This commit is contained in:
Poorna 2024-06-05 18:01:15 -07:00 committed by GitHub
parent 4148754ce0
commit 850a84b08a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 8 deletions

View File

@ -967,7 +967,7 @@ var errorCodes = errorCodeMap{
ErrReplicationRemoteConnectionError: { ErrReplicationRemoteConnectionError: {
Code: "XMinioAdminReplicationRemoteConnectionError", Code: "XMinioAdminReplicationRemoteConnectionError",
Description: "Remote service connection error", Description: "Remote service connection error",
HTTPStatusCode: http.StatusNotFound, HTTPStatusCode: http.StatusServiceUnavailable,
}, },
ErrReplicationBandwidthLimitError: { ErrReplicationBandwidthLimitError: {
Code: "XMinioAdminReplicationBandwidthLimitError", Code: "XMinioAdminReplicationBandwidthLimitError",

View File

@ -601,13 +601,6 @@ func setUploadForwardingMiddleware(h http.Handler) http.Handler {
h.ServeHTTP(w, r) h.ServeHTTP(w, r)
return return
} }
// forward request to peer handling this upload
if globalBucketTargetSys.isOffline(remote.EndpointURL) {
defer logger.AuditLog(r.Context(), w, r, mustGetClaimsFromToken(r))
writeErrorResponse(r.Context(), w, errorCodes.ToAPIErr(ErrReplicationRemoteConnectionError), r.URL)
return
}
r.URL.Scheme = remote.EndpointURL.Scheme r.URL.Scheme = remote.EndpointURL.Scheme
r.URL.Host = remote.EndpointURL.Host r.URL.Host = remote.EndpointURL.Host
// Make sure we remove any existing headers before // Make sure we remove any existing headers before