Cargo
  1. Cargo
  2. CARGO-581

A '/' in context path gets converted to %20

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.3.1-maven2, 1.0.5
    • Fix Version/s: 1.0.6
    • Component/s: Core
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      1

      Description

      When using tomcat setting properties->context to a value with a "/" in it gets converted to a ' ' or %20

      <properties>
      <context>some/context</context>
      </properties>

      The application is accessed using:

      http://localhost:8080/some%20context

        Issue Links

          Activity

          Hide
          Petter Mhln added a comment -

          This problem also leads to Cargo not being able to read jar files and therefore it fails to start, at least on Mac OSX. What happens for me is:

          A directory is created called:

          /private/tmp/cargo/conf/webapp/services presarch v1 (note the spaces where I specified slashes)

          On startup, I get errors like this:

          [INFO] [talledLocalContainer] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'presearchEntityManagerFactory' defined in class path resource [spring/presearch-persistence.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/private/tmp/cargo/conf/webapps/services%20presearch%20v1/WEB-INF/lib/core-1.0-SNAPSHOT.jar

          I tried changing the slashes to hashes, but the same problem happened: the directory under /private/tmp/cargo was created with the hashes, and when an attempt to read data from it was made, the hashes had been converted into a %XX format and the lookup failed.

          Show
          Petter Mhln added a comment - This problem also leads to Cargo not being able to read jar files and therefore it fails to start, at least on Mac OSX. What happens for me is: A directory is created called: /private/tmp/cargo/conf/webapp/services presarch v1 (note the spaces where I specified slashes) On startup, I get errors like this: [INFO] [talledLocalContainer] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'presearchEntityManagerFactory' defined in class path resource [spring/presearch-persistence.xml] : Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/private/tmp/cargo/conf/webapps/services%20presearch%20v1/WEB-INF/lib/core-1.0-SNAPSHOT.jar I tried changing the slashes to hashes, but the same problem happened: the directory under /private/tmp/cargo was created with the hashes, and when an attempt to read data from it was made, the hashes had been converted into a %XX format and the lookup failed.
          Hide
          Savas Ali Tokmen added a comment -

          Is this still the case in 1.0.1 beta 1?

          Show
          Savas Ali Tokmen added a comment - Is this still the case in 1.0.1 beta 1?
          Hide
          Savas Ali Tokmen added a comment -

          CARGO-459 is closed, closing all dependent issues.

          Show
          Savas Ali Tokmen added a comment - CARGO-459 is closed, closing all dependent issues.
          Hide
          Benoît Le Roux added a comment - - edited

          Hi all,
          I still encounter this problem with 1.0.5 version of the plugin. Anyone has an idea ?
          I use Jetty (6 or 7) in embedded mode.
          Thanks,
          Benot.

          Show
          Benoît Le Roux added a comment - - edited Hi all, I still encounter this problem with 1.0.5 version of the plugin. Anyone has an idea ? I use Jetty (6 or 7) in embedded mode. Thanks, Benot.
          Hide
          Benoît Le Roux added a comment -

          The bug is located inside WAR.java class, in method setContext. See patch CARGO-581.patch attached.

          Show
          Benoît Le Roux added a comment - The bug is located inside WAR.java class, in method setContext. See patch CARGO-581 .patch attached.
          Hide
          Savas Ali Tokmen added a comment -

          Thank you for the patch, Benot

          Applied revision 2600.

          Show
          Savas Ali Tokmen added a comment - Thank you for the patch, Benot Applied revision 2600.

            People

            • Assignee:
              Savas Ali Tokmen
              Reporter:
              Mike Youngstrom
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: