You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/08/30 21:30:46 UTC
svn commit: r1379081 - in /cxf/sandbox/dkulp_async_clients/http-hc: pom.xml
src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java
Author: dkulp
Date: Thu Aug 30 19:30:46 2012
New Revision: 1379081
URL: http://svn.apache.org/viewvc?rev=1379081&view=rev
Log:
Fix issues with multiple headers of the same name
Modified:
cxf/sandbox/dkulp_async_clients/http-hc/pom.xml
cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java
Modified: cxf/sandbox/dkulp_async_clients/http-hc/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/pom.xml?rev=1379081&r1=1379080&r2=1379081&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/pom.xml (original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/pom.xml Thu Aug 30 19:30:46 2012
@@ -80,7 +80,6 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
- <version>4.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java?rev=1379081&r1=1379080&r2=1379081&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java (original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java Thu Aug 30 19:30:46 2012
@@ -367,9 +367,12 @@ public class AsyncHTTPConduit extends UR
h.headerMap().clear();
String ct = null;
for (Header header : headers) {
- List<String> s = new ArrayList<String>(1);
+ List<String> s = h.headerMap().get(header.getName());
+ if (s == null) {
+ s = new ArrayList<String>(1);
+ h.headerMap().put(header.getName(), s);
+ }
s.add(header.getValue());
- h.headerMap().put(header.getName(), s);
if ("Content-Type".equals(header.getName())) {
ct = header.getValue();
}
Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java?rev=1379081&r1=1379080&r2=1379081&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java (original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/SharedInputBuffer.java Thu Aug 30 19:30:46 2012
@@ -126,7 +126,7 @@ public class SharedInputBuffer extends E
public int available() {
this.lock.lock();
try {
- return super.available();
+ return super.length();
} finally {
this.lock.unlock();
}