Print certain log messages once per error (#17484)
This commit is contained in:
@@ -48,7 +48,7 @@ func parseLocationConstraint(r *http.Request) (location string, s3Error APIError
|
||||
locationConstraint := createBucketLocationConfiguration{}
|
||||
err := xmlDecoder(r.Body, &locationConstraint, r.ContentLength)
|
||||
if err != nil && r.ContentLength != 0 {
|
||||
logger.LogIf(GlobalContext, err)
|
||||
logger.LogOnceIf(GlobalContext, err, "location-constraint-xml-parsing")
|
||||
// Treat all other failures as XML parsing errors.
|
||||
return "", ErrMalformedXML
|
||||
} // else for both err as nil or io.EOF
|
||||
|
||||
Reference in New Issue
Block a user