From ae1f5cda2f7d104c202f6de68ec10e1361113da9 Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Wed, 14 Jun 2023 09:12:20 -0700 Subject: [PATCH] fix: only print request headers on error --- s3api/controllers/base.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/s3api/controllers/base.go b/s3api/controllers/base.go index 11f237d..f488b5b 100644 --- a/s3api/controllers/base.go +++ b/s3api/controllers/base.go @@ -425,8 +425,8 @@ func SendResponse(ctx *fiber.Ctx, err error) error { return ctx.Send(s3err.GetAPIErrorResponse(serr, "", "", "")) } - fmt.Fprintf(os.Stderr, "Internal Error, req:\n%v\nerr:\n%v\n", - ctx.Request(), err) + fmt.Fprintf(os.Stderr, "Internal Error, req:\n%v\nerr: %v\n", + ctx.Request().Header.String(), err) return ctx.Send(s3err.GetAPIErrorResponse( s3err.GetAPIError(s3err.ErrInternalError), "", "", "")) @@ -446,8 +446,8 @@ func SendXMLResponse(ctx *fiber.Ctx, resp any, err error) error { return ctx.Send(s3err.GetAPIErrorResponse(serr, "", "", "")) } - fmt.Fprintf(os.Stderr, "Internal Error, req:\n%v\nerr:\n%v\n", - ctx.Request(), err) + fmt.Fprintf(os.Stderr, "Internal Error, req:\n%v\nerr: %v\n", + ctx.Request().Header.String(), err) return ctx.Send(s3err.GetAPIErrorResponse( s3err.GetAPIError(s3err.ErrInternalError), "", "", ""))