cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1379065 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Thu, 30 Aug 2012 18:58:55 GMT
Author: dkulp
Date: Thu Aug 30 18:58:54 2012
New Revision: 1379065

URL: http://svn.apache.org/viewvc?rev=1379065&view=rev
Log:
Async client needs a notice that there won't be output.

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1379065&r1=1379064&r2=1379065&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Thu Aug 30 18:58:54 2012
@@ -1109,6 +1109,13 @@ public abstract class HTTPConduit 
         protected abstract void updateCookiesBeforeRetransmit() throws IOException;
 
         
+        protected void handleNoOutput() throws IOException {
+            //For GET and DELETE and such, this will be called
+            //For some implementations, this notice may be required to 
+            //actually execute the request
+        }
+
+        
         protected void handleResponseOnWorkqueue(boolean allowCurrentThread, boolean forceWQ)
throws IOException {
             Runnable runnable = new Runnable() {
                 public void run() {
@@ -1194,6 +1201,7 @@ public abstract class HTTPConduit 
             // If this is a GET method we must not touch the output
             // stream as this automagically turns the request into a POST.
             if (getMethod().equals("GET")) {
+                handleNoOutput();
                 return;
             }
             
@@ -1259,9 +1267,11 @@ public abstract class HTTPConduit 
             String method = getMethod();
             if (!"POST".equals(method)
                 && !"PUT".equals(method)) {
+                handleNoOutput();
                 return;
             }
             if (outMessage.get("org.apache.cxf.post.empty") != null) {
+                handleNoOutput();
                 return;
             }
             



Mime
View raw message