Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superfluous ERROR log entry produced when no Content-Type header present #261

Closed
timbarker opened this issue Jun 4, 2019 · 2 comments
Closed
Assignees
Milestone

Comments

@timbarker
Copy link

timbarker commented Jun 4, 2019

  • Framework version: 1.3.1
  • Implementations: Spring Boot

Scenario

When handling GET requests with no content-type header set (due to not having any content) a superfluous ERROR log entry is produced. e.g.

2019-06-04 11:36:50,361 [main] ERROR c.a.s.p.i.s.AwsProxyHttpServletRequest - Called set character encoding to UTF-8 on a request without a content type. Character encoding will not be set

This results in noise in our applications logs from ALB heath-check requests which do not have a content-type header

Link to offending log line

Expected behavior

No log is emitted at ERROR level, potentially just an INFO level message

Actual behavior

An ERROR level log message is created

Steps to reproduce

Create a Lambda using this project and send a GET request with no body or content-type header present.

Full log output

2019-06-04 11:36:50,361 [main] ERROR c.a.s.p.i.s.AwsProxyHttpServletRequest - Called set character encoding to UTF-8 on a request without a content type. Character encoding will not be set

@sapessi
Copy link
Collaborator

sapessi commented Jun 4, 2019

Thanks for the feedback @timbarker. you are right, I'll change this to DEBUG for the next release.

@sapessi sapessi self-assigned this Jun 4, 2019
@sapessi sapessi added this to the Release 1.3.1 milestone Jun 4, 2019
@sapessi
Copy link
Collaborator

sapessi commented Jun 27, 2019

Release 1.3.2 - which includes this fix - is on its way to maven central! Resolving this issue.

@sapessi sapessi closed this as completed Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants