Service Packs and Hot Fixes
  1. Service Packs and Hot Fixes
  2. MNT-6695

CLONE -WebDAV - Canceling "save as" upload will create 0 byte content

    Details

    • Type: Hot Fix Request Hot Fix Request
    • Status: Closed Closed (View Workflow)
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.3.3, 3.4.4
    • Fix Version/s: 3.3.3 HF
    • Component/s: WebDAV
    • Labels:
      None
    • Environment:
      Windows - MySQL - Tomcat - Windows XP client - MS Office 2003
    • Hot Fix Version:
      Historic
    • ACT Numbers:

      34159,33830

      Description

      Steps to reproduce

      1. Connect to WebDAV from XP client with MS Office 2003.
      2. Open a large excel file (so you have time to cancel the upload or kill excel app)
      3. Click save as and save it to a space via WebDAV
      4. Click cancel during the upload or kill excel application (i.e. lose network connection)
      5. Navigate to the space you were uploading the file to

      Actual Result;
      A content with 0 byte file size has been created.

      Expected Result;
      It should not create any files as the upload was cancelled.

      Note: Canceling "drag&drop" upload works fine.(it does not creat a corrupted file)

        Issue Links

          Activity

          Hide
          Alan Davis added a comment -

          model corrected

          Show
          Alan Davis added a comment - model corrected
          Hide
          Alfresco QA Team added a comment -

          Validated on Enterprise - v3.3.3 (.17 30)

          Test performed:
          Case 1. If disable connection before client will send LOCK request, document won't appear.
          Case 2. If disable connection when client will send LOCK request, we will get the 0 byte file that will disappear after few time and next error will appear in log:

          13:30:44,725 User:admin ERROR [alfresco.webdav.protocol] Internal Server Error:
          java.net.SocketTimeoutException
          at org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:796)
          at org.apache.coyote.http11.InternalAprInputBuffer$SocketInputBuffer.doRead(InternalAprInputBuffer.java:827)
          at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
          at org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:738)
          at org.apache.coyote.Request.doRead(Request.java:428)
          at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304)
          at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
          at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327)
          at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:162)
          at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:112)
          at org.alfresco.repo.webdav.WebDAVMethod.getRequestBodyAsFile(WebDAVMethod.java:255)
          at org.alfresco.repo.webdav.WebDAVMethod.access$200(WebDAVMethod.java:79)
          at org.alfresco.repo.webdav.WebDAVMethod$1.getInputStream(WebDAVMethod.java:161)
          at org.alfresco.repo.webdav.PutMethod.executeImpl(PutMethod.java:168)
          at org.alfresco.repo.webdav.WebDAVMethod$2.execute(WebDAVMethod.java:301)
          at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:325)
          at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:251)
          at org.alfresco.repo.webdav.WebDAVMethod.execute(WebDAVMethod.java:309)
          at org.alfresco.repo.webdav.WebDAVServlet.service(WebDAVServlet.java:131)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.alfresco.repo.webdav.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:172)
          at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
          at $Proxy231.doFilter(Unknown Source)
          at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
          at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
          at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
          at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
          at java.lang.Thread.run(Thread.java:619)

          Case 3. If disable connection after client send PUT request , we will get locked file that we may delete without unlock.
          Case 4. If connection will enabled all time and after that client send second LOCK request , we will get locked file.
          Case 4. If connection will enabled all time, we'll close excel, after that client will send UNLOCK request , we will get unlocked file.

          Please, clarify next question:
          Is this error from case 2 acceptable?

          Show
          Alfresco QA Team added a comment - Validated on Enterprise - v3.3.3 (.17 30) Test performed: Case 1. If disable connection before client will send LOCK request, document won't appear. Case 2. If disable connection when client will send LOCK request, we will get the 0 byte file that will disappear after few time and next error will appear in log: 13:30:44,725 User:admin ERROR [alfresco.webdav.protocol] Internal Server Error: java.net.SocketTimeoutException at org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:796) at org.apache.coyote.http11.InternalAprInputBuffer$SocketInputBuffer.doRead(InternalAprInputBuffer.java:827) at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116) at org.apache.coyote.http11.InternalAprInputBuffer.doRead(InternalAprInputBuffer.java:738) at org.apache.coyote.Request.doRead(Request.java:428) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:304) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:327) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:162) at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:112) at org.alfresco.repo.webdav.WebDAVMethod.getRequestBodyAsFile(WebDAVMethod.java:255) at org.alfresco.repo.webdav.WebDAVMethod.access$200(WebDAVMethod.java:79) at org.alfresco.repo.webdav.WebDAVMethod$1.getInputStream(WebDAVMethod.java:161) at org.alfresco.repo.webdav.PutMethod.executeImpl(PutMethod.java:168) at org.alfresco.repo.webdav.WebDAVMethod$2.execute(WebDAVMethod.java:301) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:325) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:251) at org.alfresco.repo.webdav.WebDAVMethod.execute(WebDAVMethod.java:309) at org.alfresco.repo.webdav.WebDAVServlet.service(WebDAVServlet.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.alfresco.repo.webdav.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:172) at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy231.doFilter(Unknown Source) at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555) at java.lang.Thread.run(Thread.java:619) Case 3. If disable connection after client send PUT request , we will get locked file that we may delete without unlock. Case 4. If connection will enabled all time and after that client send second LOCK request , we will get locked file. Case 4. If connection will enabled all time, we'll close excel, after that client will send UNLOCK request , we will get unlocked file. Please, clarify next question: Is this error from case 2 acceptable?
          Hide
          Alan Davis added a comment -

          Modified the code so that on timeout of the LOCK request (which created the zero byte file), the node is removed if a PUT request has not taken place. If there is no timeout and no PUT request, the zero byte file will remain.

          Note: With Windows XP, Microsoft Office 2003 Excel requests a 3 minute timeout which Alfresco accepts.

          The zero byte file will exist for the duration of the timeout period after the LOCK if no PUT request takes place. I will be removed if the client makes an UNLOCK request without a PUT. It will still exist while a PUT request is being processed regardless of the time this takes (it may be longer than the timeout to allow for very slow networks). If an error takes place during the PUT (for example the connection is lost) an error is reported in the log (if debug is enabled) and the zero byte file is removed.

          Show
          Alan Davis added a comment - Modified the code so that on timeout of the LOCK request (which created the zero byte file), the node is removed if a PUT request has not taken place. If there is no timeout and no PUT request, the zero byte file will remain. Note: With Windows XP, Microsoft Office 2003 Excel requests a 3 minute timeout which Alfresco accepts. The zero byte file will exist for the duration of the timeout period after the LOCK if no PUT request takes place. I will be removed if the client makes an UNLOCK request without a PUT. It will still exist while a PUT request is being processed regardless of the time this takes (it may be longer than the timeout to allow for very slow networks). If an error takes place during the PUT (for example the connection is lost) an error is reported in the log (if debug is enabled) and the zero byte file is removed.
          Hide
          Alan Davis added a comment -

          Please retest with build #32

          Show
          Alan Davis added a comment - Please retest with build #32
          Hide
          Alfresco QA Team added a comment -

          Successfully validated against Alfresco Enterprise 3.3.3.17 build 32: if cancel saving excel file via WebDAV, it isn't present in the Alfresco

          Show
          Alfresco QA Team added a comment - Successfully validated against Alfresco Enterprise 3.3.3.17 build 32: if cancel saving excel file via WebDAV, it isn't present in the Alfresco

            People

            • Assignee:
              Closed Bugs
              Reporter:
              Lucas Kwon
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days
                2d