diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-12-07 09:35:48 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-07 09:35:48 -0800 |
| commit | 2ba08afed1547038193d9bee80fb62753f5cf4e5 (patch) | |
| tree | ce01428010b827f79567e59a766ebc0e60ed0daa /weed/s3api/s3err/error_handler.go | |
| parent | 7f0a97c7b676c828f9bcf8556a5d9fbe63175939 (diff) | |
| parent | 10678cde81b76a6a7148dc4a9939c169777090ae (diff) | |
| download | seaweedfs-2ba08afed1547038193d9bee80fb62753f5cf4e5.tar.xz seaweedfs-2ba08afed1547038193d9bee80fb62753f5cf4e5.zip | |
Merge pull request #2498 from kmlebedev/s3_audit_log
Diffstat (limited to 'weed/s3api/s3err/error_handler.go')
| -rw-r--r-- | weed/s3api/s3err/error_handler.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/s3api/s3err/error_handler.go b/weed/s3api/s3err/error_handler.go index 3cfdaafef..6753a1641 100644 --- a/weed/s3api/s3err/error_handler.go +++ b/weed/s3api/s3err/error_handler.go @@ -25,6 +25,7 @@ func WriteXMLResponse(w http.ResponseWriter, r *http.Request, statusCode int, re func WriteEmptyResponse(w http.ResponseWriter, r *http.Request, statusCode int) { WriteResponse(w, r, statusCode, []byte{}, mimeNone) + PostLog(r, statusCode, ErrNone) } func WriteErrorResponse(w http.ResponseWriter, r *http.Request, errorCode ErrorCode) { @@ -39,6 +40,7 @@ func WriteErrorResponse(w http.ResponseWriter, r *http.Request, errorCode ErrorC errorResponse := getRESTErrorResponse(apiError, r.URL.Path, bucket, object) encodedErrorResponse := EncodeXMLResponse(errorResponse) WriteResponse(w, r, apiError.HTTPStatusCode, encodedErrorResponse, MimeXML) + PostLog(r, apiError.HTTPStatusCode, errorCode) } func getRESTErrorResponse(err APIError, resource string, bucket, object string) RESTErrorResponse { |
