From e32b948a492d605335a94180a0dfb4f29e983c5e Mon Sep 17 00:00:00 2001 From: Poorna Date: Thu, 10 Nov 2022 16:17:45 -0800 Subject: [PATCH] fix: parsing multipart uploadID under site replicated setup (#16048) continue the fix from #16034 --- cmd/erasure-utils.go | 2 +- cmd/generic-handlers.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/erasure-utils.go b/cmd/erasure-utils.go index 434267b2b..0a7e073e8 100644 --- a/cmd/erasure-utils.go +++ b/cmd/erasure-utils.go @@ -122,7 +122,7 @@ func writeDataBlocks(ctx context.Context, dst io.Writer, enBlocks [][]byte, data // returns deploymentID from uploadID func getDeplIDFromUpload(uploadID string) (string, error) { - uploadBytes, err := base64.StdEncoding.DecodeString(uploadID) + uploadBytes, err := base64.RawURLEncoding.DecodeString(uploadID) if err != nil { return "", fmt.Errorf("error parsing uploadID %s (%w)", uploadID, err) } diff --git a/cmd/generic-handlers.go b/cmd/generic-handlers.go index 69f0ecb32..e4bfb0ef8 100644 --- a/cmd/generic-handlers.go +++ b/cmd/generic-handlers.go @@ -593,7 +593,7 @@ func setUploadForwardingHandler(h http.Handler) http.Handler { if bucket != "" && object != "" && uploadID != "" { deplID, err := getDeplIDFromUpload(uploadID) if err != nil { - writeErrorResponse(r.Context(), w, errorCodes.ToAPIErr(ErrNoSuchUpload), r.URL) + h.ServeHTTP(w, r) return } remote, self := globalSiteReplicationSys.getPeerForUpload(deplID)