Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324359

Summary: Illegal operations on AsyncContinuation should not change its state.
Product: [RT] Jetty Reporter: David Jencks <david.a.jencks>
Component: serverAssignee: Greg Wilkins <gregw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox, mgorovoy
Version: 8.0.0   
Target Milestone: 7.1.x   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description David Jencks CLA 2010-09-02 18:55:42 EDT
suspend changes a few fields, then checks to see if the current state is one in which suspend can be called.  This can result in an infinite loop with code like:

AsyncContext ac = request.startAsync();
ac.dispatch(...);
try {
  request.startAsync();
} catch (IllegalStateException e) {
  response.getWriter("Hah! fooled you");
}
Comment 1 David Jencks CLA 2010-09-02 18:57:03 EDT
Fix committed in rev 2237
Comment 2 David Jencks CLA 2010-09-02 20:53:48 EDT
port to jetty 7 in rev 2239
Comment 3 Michael Gorovoy CLA 2010-09-07 21:04:47 EDT
Marking as resolved.