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

Infinite loop with custom error controller when "406 Not Acceptable" [SPR-12066] #16682

Closed
spring-projects-issues opened this issue Aug 5, 2014 · 4 comments
Assignees
Labels
in: web

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 5, 2014

Sin-young "Divinespear" Kang opened SPR-12066 and commented

(excuse my broken english :P)

before start: some web crawlers try invalid Accept header to avoid blocking.

I've build my webapp using spring-boot, and it worked well.
some hours after release, server reported servlet container (I use Jetty) consume all system resources.

and log pointed there is infinite loop on error handling filter.

To Reproduce

  1. build webapp using spring-boot (autoconfigured BasicErrorController) or configure custom error controller (may with @ResponseBody for return JSON to reproduce.).
  2. run servlet container
  3. open terminal and type curl -H "Accept: application/octet-stream" http://localhost:8080/<context-path>/error

Possible Solution
when previous status code detected and it's 406, wrap ServletRequest and avoid return Accept header.


Affects: 4.0.6

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Aug 5, 2014

Sébastien Deleuze commented

Hi,

If this is a Spring Boot related issue, then you should report it on Spring Boot bugtracker, not here.

I can't reproduce the issue with Spring Framework 4.0.6 and Spring Boot 1.1.4, so if you think this is a Spring Framework related issue, could you provide a sample project that allows to reproduce the error ? You can fork https://github.com/spring-projects/spring-framework-issues and add a new #16682.

If you think it is related to Spring Boot, let me know I will close this one.

Thanks for your feedback,
Sébastien

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Aug 6, 2014

Sébastien Deleuze commented

Please reopen if you achieve to reproduce this issue in a project without Spring Boot.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Aug 7, 2014

Stéphane Nicoll commented

A boot issue has been created for this issue.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Aug 7, 2014

Andy Wilkinson commented

And I've just determined that the issue's already been fixed under 1257. The fix will be in Spring Boot 1.1.5.

@spring-projects-issues spring-projects-issues added type: bug in: web labels Jan 11, 2019
@spring-projects-issues spring-projects-issues removed the type: bug label Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web
Projects
None yet
Development

No branches or pull requests

2 participants