Author: rombert
Date: Tue Aug  4 12:10:25 2015
New Revision: 1694037

URL: http://svn.apache.org/r1694037
Log:
SLING-4924 - Unable to deploy bundle on a Sling instance with a custom
context 

Use RepositoryInfo.appendPath in the HttpOsgiClient

Modified:
    
sling/trunk/tooling/ide/api/src/org/apache/sling/ide/osgi/impl/HttpOsgiClient.java

Modified: 
sling/trunk/tooling/ide/api/src/org/apache/sling/ide/osgi/impl/HttpOsgiClient.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/api/src/org/apache/sling/ide/osgi/impl/HttpOsgiClient.java?rev=1694037&r1=1694036&r2=1694037&view=diff
==============================================================================
--- 
sling/trunk/tooling/ide/api/src/org/apache/sling/ide/osgi/impl/HttpOsgiClient.java
 (original)
+++ 
sling/trunk/tooling/ide/api/src/org/apache/sling/ide/osgi/impl/HttpOsgiClient.java
 Tue Aug  4 12:10:25 2015
@@ -63,7 +63,7 @@ public class HttpOsgiClient implements O
     @Override
     public Version getBundleVersion(String bundleSymbolicName) throws 
OsgiClientException {
 
-        GetMethod method = new GetMethod(repositoryInfo.getUrl() + 
"system/console/bundles.json");
+        GetMethod method = new 
GetMethod(repositoryInfo.appendPath("system/console/bundles.json"));
         HttpClient client = getHttpClient();
         InputStream input = null;
 
@@ -126,7 +126,7 @@ public class HttpOsgiClient implements O
         }
 
         // append pseudo path after root URL to not get redirected for nothing
-        final PostMethod filePost = new 
PostMethod(repositoryInfo.getUrl()+"system/console/install");
+        final PostMethod filePost = new 
PostMethod(repositoryInfo.appendPath("system/console/install"));
 
         try {
             // set referrer
@@ -203,7 +203,7 @@ public class HttpOsgiClient implements O
 
         void installBundle() throws OsgiClientException {
 
-            PostMethod method = new PostMethod(repositoryInfo.getUrl() + 
"system/sling/tooling/install");
+            PostMethod method = new 
PostMethod(repositoryInfo.appendPath("system/sling/tooling/install"));
 
             try {
                 configureRequest(method);


Reply via email to