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)