JBossWS SVN: r11702 - projects/plugins/maven/jaxws-tools/tags.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-01 09:14:48 -0500 (Mon, 01 Mar 2010)
New Revision: 11702
Added:
projects/plugins/maven/jaxws-tools/tags/jaxws-tools-1.0.0.GA/
Log:
[JBWS-2650] Tagging first final release of maven plugins for jbossws jaxws tools
Copied: projects/plugins/maven/jaxws-tools/tags/jaxws-tools-1.0.0.GA (from rev 11701, projects/plugins/maven/jaxws-tools/trunk)
14 years, 9 months
JBossWS SVN: r11701 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-01 05:04:03 -0500 (Mon, 01 Mar 2010)
New Revision: 11701
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
Log:
[JBWS-2947] Prevent failure on HTTP 100 responses
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2010-02-27 11:54:43 UTC (rev 11700)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2010-03-01 10:04:03 UTC (rev 11701)
@@ -29,6 +29,8 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import javax.servlet.http.HttpServletResponse;
+
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBufferInputStream;
import org.jboss.netty.channel.ChannelHandlerContext;
@@ -37,6 +39,7 @@
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import org.jboss.netty.handler.codec.http.HttpResponse;
+import org.jboss.netty.handler.codec.http.HttpResponseStatus;
import org.jboss.netty.handler.codec.http.HttpVersion;
/**
@@ -66,16 +69,20 @@
return;
}
future.start();
- ResultImpl result = new ResultImpl();
- future.setResult(result);
try
{
HttpResponse response = (HttpResponse)e.getMessage();
-
+ HttpResponseStatus responseStatus = response.getStatus();
+ if (HttpServletResponse.SC_CONTINUE == responseStatus.getCode())
+ {
+ //[JBWS-2947] Even if we do not send any Expect request-header, we should not fail on HTTP 100 replies, so we just go on to the following message ignoring them
+ return;
+ }
+ ResultImpl result = new ResultImpl();
Map<String, Object> metadata = result.getMetadata();
metadata.put(NettyClient.PROTOCOL, response.getProtocolVersion());
- metadata.put(NettyClient.RESPONSE_CODE, response.getStatus().getCode());
- metadata.put(NettyClient.RESPONSE_CODE_MESSAGE, response.getStatus().getReasonPhrase());
+ metadata.put(NettyClient.RESPONSE_CODE, responseStatus.getCode());
+ metadata.put(NettyClient.RESPONSE_CODE_MESSAGE, responseStatus.getReasonPhrase());
Map<String, Object> responseHeaders = result.getResponseHeaders();
for (String headerName : response.getHeaderNames())
{
@@ -84,13 +91,12 @@
ChannelBuffer content = response.getContent();
result.setResponse(new ChannelBufferInputStream(content));
+ future.setResult(result);
+ future.done();
}
catch (Throwable t)
{
future.setException(t);
- }
- finally
- {
future.done();
}
}
14 years, 9 months