Closes gh-31541
Motivation
According to https://bz.apache.org/bugzilla/show_bug.cgi?id=66875#c11,
our StandardServletAsyncWebRequest.onError implementation should call asyncContext.complete()
if that context is still non-null.
Let's sort this out for 6.1.3 and backport it to 6.0.16 and 5.3.32 from there.
- On https://github.com/spring-projects/spring-framework/issues/31541#issuecomment-1870120560, we found that our
StandardServletAsyncWebRequest.onError
implementation should callasyncContext.complete()
if that context is still non-null.
Tomcat's error handling triggers the onError event.
...
Spring and/or the application should be calling complete() or dispatch() as a result of the onError() event.
- See bug report for the details
Modification
- Fix
AsyncContext
to be completed onStandardServletAsyncWebRequest.onError()
Result
- Closes https://github.com/spring-projects/spring-framework/issues/31541
Comment From: rstoyanchev
As per https://github.com/spring-projects/spring-framework/issues/31541#issuecomment-1882859756, this is not the fix we want. Thanks for preparing the pull request in any case!