aboutsummaryrefslogtreecommitdiff
path: root/weed/server
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-05-30 22:47:26 -0700
committerchrislu <chris.lu@gmail.com>2022-05-30 22:47:26 -0700
commit596c3860cac83a75ae9ce728c8a043133c03d098 (patch)
tree4cbf4a4b8f2be1f67ce60ec455860d1a9fc912e7 /weed/server
parent8902fa6ff653aa40249d2d6da49a9227b63415bb (diff)
downloadseaweedfs-596c3860cac83a75ae9ce728c8a043133c03d098.tar.xz
seaweedfs-596c3860cac83a75ae9ce728c8a043133c03d098.zip
use final destination to resolve fs configuration
related to https://github.com/chrislusf/seaweedfs/issues/3075
Diffstat (limited to 'weed/server')
-rw-r--r--weed/server/filer_server_handlers_write.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go
index b0e0c5af0..acee23da7 100644
--- a/weed/server/filer_server_handlers_write.go
+++ b/weed/server/filer_server_handlers_write.go
@@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
+ "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants"
"net/http"
"os"
"strings"
@@ -58,8 +59,13 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request, conte
ctx := context.Background()
+ destination := r.RequestURI
+ if finalDestination := r.Header.Get(s3_constants.SeaweedStorageDestinationHeader); finalDestination != "" {
+ destination = finalDestination
+ }
+
query := r.URL.Query()
- so, err := fs.detectStorageOption0(r.RequestURI,
+ so, err := fs.detectStorageOption0(destination,
query.Get("collection"),
query.Get("replication"),
query.Get("ttl"),