DO NOT REPLY [Bug 49698] AsyncContext timeout always return http 500
https://issues.apache.org/bugzilla/show_bug.cgi?id=49698 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #6 from Mark Thomas 2010-08-28 07:09:09 EDT --- Yep. It was a bug in the state machine. I have fixed this for 7.0.x and it will be included in 7.0.3 onwards. Thanks for the report. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49698] AsyncContext timeout always return http 500
https://issues.apache.org/bugzilla/show_bug.cgi?id=49698 Mark Thomas changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | --- Comment #5 from Mark Thomas 2010-08-04 13:09:49 EDT --- OK, let me take a look. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49698] AsyncContext timeout always return http 500
https://issues.apache.org/bugzilla/show_bug.cgi?id=49698 --- Comment #4 from heyoulin 2010-08-04 13:03:05 EDT --- (In reply to comment #3) > You are required by the spec to implement a listener to handle the timeout. I have a listener to handle the timeout. public void onTimeout(AsyncEvent event) throws IOException { event.getAsyncContext().complete(); } When implement event.getAsyncContext().complete() actually tomcat do nothing.AsyncState is still in COMPLETING.So return http500. So how to handle the timeout to make AsyncState to NOT_STARTED only using servlet 3.0 api? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49698] AsyncContext timeout always return http 500
https://issues.apache.org/bugzilla/show_bug.cgi?id=49698 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #3 from Mark Thomas 2010-08-04 12:35:27 EDT --- You are required by the spec to implement a listener to handle the timeout. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49698] AsyncContext timeout always return http 500
https://issues.apache.org/bugzilla/show_bug.cgi?id=49698 --- Comment #2 from heyoulin 2010-08-04 12:02:52 EDT --- (In reply to comment #1) > Which version are you using? > There were a number of fixes in this area included in 7.0.2 (currently being > voted on for release). > Whilst the release vote is in progress, you can get a copy for testing from > here: > http://people.apache.org/~markt/dev/tomcat-7/v7.0.2/ > Note that this is NOT an official release. I build from svn sources. From the sources: public void doInternalDispatch() throws ServletException, IOException { if (this.state.compareAndSet(AsyncState.TIMING_OUT, AsyncState.COMPLETING)) { log.debug("TIMING OUT!"); boolean listenerInvoked = false; for (AsyncListenerWrapper listener : listeners) { listener.fireOnTimeout(event); listenerInvoked = true; } if (listenerInvoked) { // Listener should have called complete if (state.get() != AsyncState.NOT_STARTED) { ((HttpServletResponse)servletResponse).setStatus(500); doInternalComplete(true); } ... When timeout AsyncState is COMPLETING. But complete method do nothing to COMPLETING state: public void complete() { if (log.isDebugEnabled()) { log.debug("AsyncContext Complete Called["+state.get()+"; "+request.getRequestURI()+"?"+request.getQueryString()+"]", new DebugException()); } if (state.get()==AsyncState.COMPLETING) { //do nothing } So always return http500. It has changed since svn revision 966548.In revision 960692 is below: ublic void doInternalDispatch() throws ServletException, IOException { if (this.state.compareAndSet(AsyncState.TIMING_OUT, AsyncState.COMPLETING)) { log.debug("TIMING OUT!"); boolean listenerInvoked = false; for (AsyncListenerWrapper listener : listeners) { listener.fireOnTimeout(event); listenerInvoked = true; } if (!listenerInvoked) { ((HttpServletResponse)servletResponse).setStatus(500); } doInternalComplete(true); -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49698] AsyncContext timeout always return http 500
https://issues.apache.org/bugzilla/show_bug.cgi?id=49698 --- Comment #1 from Mark Thomas 2010-08-04 07:09:57 EDT --- Which version are you using? There were a number of fixes in this area included in 7.0.2 (currently being voted on for release). Whilst the release vote is in progress, you can get a copy for testing from here: http://people.apache.org/~markt/dev/tomcat-7/v7.0.2/ Note that this is NOT an official release. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org