Skip to content

Instantly share code, notes, and snippets.

@jfarcand
Created November 1, 2010 14:09
Show Gist options
  • Save jfarcand/658220 to your computer and use it in GitHub Desktop.
Save jfarcand/658220 to your computer and use it in GitHub Desktop.
diff --git a/client/pom.xml b/client/pom.xml
index 95a2a99..6ab8daf 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -55,7 +55,7 @@
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
diff --git a/client/src/main/java/org/apache/xmlrpc/client/XmlRpcAhcTransport.java b/client/src/main/java/org/apache/xmlrpc/client/XmlRpcAhcTransindex 97200dd..f30a484 100644
--- a/client/src/main/java/org/apache/xmlrpc/client/XmlRpcAhcTransport.java
+++ b/client/src/main/java/org/apache/xmlrpc/client/XmlRpcAhcTransport.java
@@ -104,7 +104,8 @@ public class XmlRpcAhcTransport
enc = XmlRpcStreamConfig.UTF8_ENCODING;
}
- realmBuilder = (new Realm.RealmBuilder()).setPrincipal( userName ).setPassword( pConfig.getBasicPassword() );
+ realmBuilder = (new Realm.RealmBuilder()).setPrincipal( userName ).setPassword( pConfig.getBasicPassword() )
+ .setUsePreemptiveAuth( true ).setEnconding( enc );
}
}
@@ -136,7 +137,7 @@ public class XmlRpcAhcTransport
throw new XmlRpcIOException( e );
}
}
- } );
+ } );
}
//
@@ -158,10 +159,8 @@ public class XmlRpcAhcTransport
requestBuilder.build();
// Check the status of the return
- Future<Response> future = requestBuilder.execute();
-
- Response response = future.get();
-
+ Response response = requestBuilder.execute().get();
+
return response.getResponseBodyAsStream();
}
catch ( InterruptedException e )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment