Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-569

Inconsistent encoding behavior for repository URLs with spaces

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.3.4
    • Component/s: wagon-http
    • Labels:
      None
    • Environment:

      Description

      Hi - I have a maven project that deploys its artifacts to a remote repository. I have configured the remote repository both in the repositories and distributionRepositories as follows: 

      <repositories>   
       <repository>   
        <id>id1</id>  
        <url>https://hostname/test/spacyurl%20Spacy/maven/v1</url>   
        <releases> 
          <enabled>true</enabled>
         </releases>   
        <snapshots>     
         <enabled>true</enabled>
         </snapshots> 
       </repository>   
      </repositories>   
      <distributionManagement>   
       <repository>   
        <id>id1</id>  
        <url>https://hostname/test/spacyurl%20Spacy/maven/v1</url>   
        <releases> 
          <enabled>true</enabled>
        </releases>   
        <snapshots>     
         <enabled>true</enabled>
        </snapshots> 
       </repository>   
      </distributionManagement>
      
      
      
      

      As you can see my URL has spaces in it.

      When I run 'mvn install', it correctly uses the encoded URL with spaces and downloads the dependencies. However, when I try to deploy this package to the remote repo, it fails with a 404 not found error. On further investigation, it looks like the URL is being encoded twice before the PUT request is sent. 

      If I remove the encoding, ie., put the URL with spaces, the deployment works, however, the install fails.

      Let me know if you need more information about this.

      Aasim
       

        Attachments

        1. debug-log-2019-10-16.txt
          163 kB
          Aasim Malladi
        2. debug-log-2019-10-16-2.txt
          233 kB
          Aasim Malladi

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                aamallad Aasim Malladi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m