This commit is contained in:
Chris Lu
2018-07-21 17:39:10 -07:00
parent dc8dd8b486
commit 7e2031b18f
43 changed files with 109 additions and 109 deletions

View File

@@ -1,14 +1,14 @@
package s3api
import (
"net/http"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/glog"
"time"
"context"
"fmt"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/gorilla/mux"
"net/http"
"os"
"time"
)
var (

View File

@@ -26,7 +26,7 @@ type ErrorCode int
// Error codes, see full list at http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
const (
ErrNone ErrorCode = iota
ErrNone ErrorCode = iota
ErrMethodNotAllowed
ErrBucketNotEmpty
ErrBucketAlreadyExists

View File

@@ -1,17 +1,17 @@
package s3api
import (
"net/http"
"net/url"
"fmt"
"time"
"github.com/gorilla/mux"
"bytes"
"context"
"encoding/base64"
"encoding/xml"
"fmt"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/util"
"bytes"
"encoding/xml"
"encoding/base64"
"github.com/gorilla/mux"
"net/http"
"net/url"
"time"
)
type mimeType string

View File

@@ -1,12 +1,12 @@
package s3api
import (
"net/http"
"github.com/chrislusf/seaweedfs/weed/glog"
"encoding/json"
"fmt"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/gorilla/mux"
"io/ioutil"
"encoding/json"
"net/http"
)
var (

View File

@@ -37,7 +37,7 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) {
apiRouter := router.PathPrefix("/").Subrouter()
var routers []*mux.Router
if s3a.option.DomainName != "" {
routers = append(routers, apiRouter.Host("{bucket:.+}." + s3a.option.DomainName).Subrouter())
routers = append(routers, apiRouter.Host("{bucket:.+}."+s3a.option.DomainName).Subrouter())
}
routers = append(routers, apiRouter.PathPrefix("/{bucket}").Subrouter())