From 850a84b08a9459a52951269a985484aca7593207 Mon Sep 17 00:00:00 2001 From: Poorna Date: Wed, 5 Jun 2024 18:01:15 -0700 Subject: [PATCH] simplify site replication multipart proxying (#19885) --- cmd/api-errors.go | 2 +- cmd/generic-handlers.go | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cmd/api-errors.go b/cmd/api-errors.go index 4031b5ee5..8c34445bb 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -967,7 +967,7 @@ var errorCodes = errorCodeMap{ ErrReplicationRemoteConnectionError: { Code: "XMinioAdminReplicationRemoteConnectionError", Description: "Remote service connection error", - HTTPStatusCode: http.StatusNotFound, + HTTPStatusCode: http.StatusServiceUnavailable, }, ErrReplicationBandwidthLimitError: { Code: "XMinioAdminReplicationBandwidthLimitError", diff --git a/cmd/generic-handlers.go b/cmd/generic-handlers.go index 7bb8e07d2..c33d2f2e7 100644 --- a/cmd/generic-handlers.go +++ b/cmd/generic-handlers.go @@ -601,13 +601,6 @@ func setUploadForwardingMiddleware(h http.Handler) http.Handler { h.ServeHTTP(w, r) 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.Host = remote.EndpointURL.Host // Make sure we remove any existing headers before