Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-11942

Share proxy servlet strips leading slash from path param

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.4 Enterprise, 3.4.d Community, 4.0.b Community, 5.0.d Community
    • Fix Version/s: None
    • Component/s: Web Scripts and Surf
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      Alfresco Enterprise 3.4.1, Alfresco Community 3.4.d, Alfresco Community 4.0b, Firefox, Mac OS X, Tomcat, MySQL

      Description

      If you have a file in a Share site, you can get to it via the getContent web script using the path as follows:
      http://localhost:8080/alfresco/s/api/path/content/workspace/SpacesStore//Sites/testsite1/documentLibrary/testfolder/testsubfolder/test.png

      Note the double forward slash before "Sites".

      If you change the URL to leverage the Share proxy servlet as follows:
      http://localhost:8080/share/proxy/alfresco/api/path/content/workspace/SpacesStore//Sites/testsite1/documentLibrary/testfolder/testsubfolder/test.png

      it apparently strips the double slash and results in a 404. The error message indicates that the extra slash has been stripped:

      The Web Script /alfresco/s/api/path/content/workspace/SpacesStore/Sites/testsite1/documentLibrary/testfolder/testsubfolder/test.png has responded with a status of 404 - Not Found.

      404 Description: Requested resource is not available.

      Message: 11080006 Unable to find NodePathReference[storeRef=workspace://SpacesStore,path=Sites/testsite1/documentLibrary/testfolder/testsubfolder/test.png]

      Exception: org.springframework.extensions.webscripts.WebScriptException - 11080006 Unable to find NodePathReference[storeRef=workspace://SpacesStore,path=Sites/testsite1/documentLibrary/testfolder/testsubfolder/test.png]

      org.alfresco.repo.web.scripts.content.ContentGet.execute(ContentGet.java:135)
      org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:377)
      org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
      org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
      org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
      org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
      org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:352)
      org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
      org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.alfresco.web.scripts.servlet.StaticAssetCacheFilter.doFilter(StaticAssetCacheFilter.java:70)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      java.lang.Thread.run(Thread.java:680)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                jpotts Jeff Potts [X] (Inactive)
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: