aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3err/error_handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/s3api/s3err/error_handler.go')
-rw-r--r--weed/s3api/s3err/error_handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/s3api/s3err/error_handler.go b/weed/s3api/s3err/error_handler.go
index 2d98700b1..7e5e262a6 100644
--- a/weed/s3api/s3err/error_handler.go
+++ b/weed/s3api/s3err/error_handler.go
@@ -27,7 +27,7 @@ func WriteEmptyResponse(w http.ResponseWriter, r *http.Request, statusCode int)
WriteResponse(w, r, statusCode, []byte{}, mimeNone)
}
-func WriteErrorResponse(w http.ResponseWriter, errorCode ErrorCode, r *http.Request) {
+func WriteErrorResponse(w http.ResponseWriter, r *http.Request, errorCode ErrorCode) {
vars := mux.Vars(r)
bucket := vars["bucket"]
object := vars["object"]
@@ -88,5 +88,5 @@ func WriteResponse(w http.ResponseWriter, r *http.Request, statusCode int, respo
// If none of the http routes match respond with MethodNotAllowed
func NotFoundHandler(w http.ResponseWriter, r *http.Request) {
glog.V(0).Infof("unsupported %s %s", r.Method, r.RequestURI)
- WriteErrorResponse(w, ErrMethodNotAllowed, r)
+ WriteErrorResponse(w, r, ErrMethodNotAllowed)
}