mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: parsing multipart uploadID under site replicated setup (#16048)
continue the fix from #16034
This commit is contained in:
parent
4fe9cbb973
commit
e32b948a49
@ -122,7 +122,7 @@ func writeDataBlocks(ctx context.Context, dst io.Writer, enBlocks [][]byte, data
|
|||||||
|
|
||||||
// returns deploymentID from uploadID
|
// returns deploymentID from uploadID
|
||||||
func getDeplIDFromUpload(uploadID string) (string, error) {
|
func getDeplIDFromUpload(uploadID string) (string, error) {
|
||||||
uploadBytes, err := base64.StdEncoding.DecodeString(uploadID)
|
uploadBytes, err := base64.RawURLEncoding.DecodeString(uploadID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("error parsing uploadID %s (%w)", uploadID, err)
|
return "", fmt.Errorf("error parsing uploadID %s (%w)", uploadID, err)
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@ func setUploadForwardingHandler(h http.Handler) http.Handler {
|
|||||||
if bucket != "" && object != "" && uploadID != "" {
|
if bucket != "" && object != "" && uploadID != "" {
|
||||||
deplID, err := getDeplIDFromUpload(uploadID)
|
deplID, err := getDeplIDFromUpload(uploadID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
writeErrorResponse(r.Context(), w, errorCodes.ToAPIErr(ErrNoSuchUpload), r.URL)
|
h.ServeHTTP(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
remote, self := globalSiteReplicationSys.getPeerForUpload(deplID)
|
remote, self := globalSiteReplicationSys.getPeerForUpload(deplID)
|
||||||
|
Loading…
Reference in New Issue
Block a user