diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-10-31 18:05:34 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-10-31 18:05:34 -0700 |
| commit | f17fa400d59a123ddfa76d1aac1d701d7b19e951 (patch) | |
| tree | 8eeed582bf932a0d2f5d1e1f72857edd3efb5831 /weed/s3api/s3err/error_handler.go | |
| parent | 006b4ec0f8ebdd0964e412fdf5f327284d838443 (diff) | |
| download | seaweedfs-f17fa400d59a123ddfa76d1aac1d701d7b19e951.tar.xz seaweedfs-f17fa400d59a123ddfa76d1aac1d701d7b19e951.zip | |
refactoring
Diffstat (limited to 'weed/s3api/s3err/error_handler.go')
| -rw-r--r-- | weed/s3api/s3err/error_handler.go | 4 |
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) } |
