On 31 August 2016 13:22:34 BST, Olivier Jaquemet <olivier.jaque...@jalios.com> wrote: >Hi all, > >We are encountering a weird but frequent exception when users try to >access AVI video playback on IE11. >My analysis is that it's a bad behavior of Tomcat when using >HttpServletResponseWrapper. > >I did not want to immediately create a bug report, first because you >might have other insight on the subject, and also because the bug >affects all tomcat version, thus I wanted to be sure on the appropriate > >way to report. Indeed the bug report page >(https://tomcat.apache.org/bugreport.html) does not explain what to do >if bugs affect several version of Tomcat. Only enter bug for the latest > >version ? Enter bug serval time ? Or maybe there is a way to select >multiple product at once ?
Open one bug against the earliest affected version. Patches, if any, are most useful if against trunk. >I have setup a very simple reproduction webapp (2 nearly empty class, >one html, one video) that can be downloaded here : >https://www.dropbox.com/s/q61obn8381hugug/test.war?dl=0 (204.72 KB) > >This webapp is configured with a simple servlet filter, doing nothing >special but wrapping the response using a simple >HttpServletResponseWrapper (not doing anything at all) and logging >request information on exception. >To help demonstrate the cause of the problem, the filter expose an init > >parameter "wrap-response" in web.xml which quickly allows the webapp to > >be tested with 2 behavior : response wrapped (to exhibit the bug) or >not >(to behave properly). >The home page contains a video player with a very small AVI file. > >The reproduction steps : > * Start Tomcat (any version) with the webapp above > * Access the index page using IE 11 on Windows 7 (very important : >clear browser cache between each test) > --> The exception at the end of this message occurs. > * Edit web.xml, set "wrap-response" init parameter to false > * Repeat the test with IE (don't forget to clear cache!) > --> No exception. > >The problem may be workaround by modifying Tomcat's web.xml by >disabling >Accept-Ranges support. > > <init-param> > <param-name>useAcceptRanges</param-name> > <param-value>false</param-value> > </init-param> > >Because the ClientAbortException/IOException does not occurs if the >response is not wrapped, and does not occurs either if acceptRange is >disabled, it really make me think that is a bug in Tomcat (and not a >behavior of the client contrary to what ClientAbortException implies). Hmm. The dependence on range support makes me want to double check what the filter is doing. There was an issue with filters, range support and the default servlet several years back. I need to remind myself of the details. >Bug verified to exist in all following version (with a default install) > >(using JDK 1.8.0_102-b14 on Win7 SP1): > Apache Tomcat/7.0.70 > Apache Tomcat/8.0.36 > Apache Tomcat/8.5.4 > Apache Tomcat/9.0.0.M9 > >** Should I fill the bug report? and if so, on which product should I >report the bug ? ** Yes. Against 7.0.x unless 6.0.x is affected as well. I plan to look at this once the current set of releases is complete unless someone else beats me to it. Mark >Thanks for your help, >Olivier > >---- >The exception : >org.apache.catalina.connector.ClientAbortException: >java.io.IOException: >Une connexion établie a été abandonnée par un logiciel de votre >ordinateur hôte > at >org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:396) > at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:344) > at >org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:421) > at >org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:409) > at >org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97) > at >org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:90) > at >org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:961) > at >org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:398) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) > at >org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) > at com.example.BasicFilter.doFilter(BasicFilter.java:37) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) > at >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) > at >org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) > at >org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) > at >org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) > at >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) > at >org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) > at >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) > at >org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) > at >org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) > at >org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) > at >org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) > at >org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) > at >java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at >java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at >org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) >Caused by: java.io.IOException: Une connexion établie a été abandonnée >par un logiciel de votre ordinateur hôte > at sun.nio.ch.SocketDispatcher.write0(Native Method) > at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51) > at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) > at sun.nio.ch.IOUtil.write(IOUtil.java:65) > at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) > at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:124) > at >org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101) > at >org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172) > at >org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139) > at >org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:197) > at >org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41) > at >org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320) > at >org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84) > at >org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256) > at org.apache.coyote.Response.doWrite(Response.java:491) > at >org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:391) > ... 33 more > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org