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

Fixed IllegalStateException when accessing AsyncContext #12

Merged
merged 2 commits into from Oct 9, 2015
Merged

Fixed IllegalStateException when accessing AsyncContext #12

merged 2 commits into from Oct 9, 2015

Conversation

whiskeysierra
Copy link
Collaborator

Turns out that ServletRequest.getAsyncContext() by contract is supposed to throw an IllegalStateException if no async process was started. I just used request.getAsyncContext() == null to see if the current filter pass was a part of an async dispatch. Coincidentally Tomcat doesn't adhere to the spec here and actually returns null, which made it look like it worked. Testing it with Undertow though showed the problem.

Additionally Spring MockMvc doesn't generate a true async dispatch request; the dispatcher type was still set to REQUEST. Fun stuff...

@lukasniemeier-zalando
Copy link
Member

Sounds like you had fun 👍

whiskeysierra added a commit that referenced this pull request Oct 9, 2015
Fixed IllegalStateException when accessing AsyncContext
@whiskeysierra whiskeysierra merged commit 59d2b18 into zalando:master Oct 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants