cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject svn commit: r1501854 - in /cxf/branches/2.7.x-fixes: ./ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Date Wed, 10 Jul 2013 17:04:18 GMT
Author: asoldano
Date: Wed Jul 10 17:04:18 2013
New Revision: 1501854

URL: http://svn.apache.org/r1501854
Log:
Merged revisions 1501833 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1501833 | asoldano | 2013-07-10 18:27:16 +0200 (Wed, 10 Jul 2013) | 2 lines
  
  [CXF-5116] DelegatingInputStream created in AbstractHTTPDestination is cached into wrong
Message instance
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
    cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1501833

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?rev=1501854&r1=1501853&r2=1501854&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
Wed Jul 10 17:04:18 2013
@@ -342,12 +342,12 @@ public class JettyHTTPDestination extend
         if (inMessage == null) {
             
             inMessage = new MessageImpl();
+            ExchangeImpl exchange = new ExchangeImpl();
+            exchange.setInMessage(inMessage);
             setupMessage(inMessage, context, req, resp);
             
             ((MessageImpl)inMessage).setDestination(this);
     
-            ExchangeImpl exchange = new ExchangeImpl();
-            exchange.setInMessage(inMessage);
             exchange.setSession(new HTTPSession(req));
         }
         

Modified: cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1501854&r1=1501853&r2=1501854&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Wed Jul 10 17:04:18 2013
@@ -219,14 +219,14 @@ public abstract class AbstractHTTPDestin
         if (inMessage == null) {
             LOG.fine("Create a new message for processing");
             inMessage = new MessageImpl();
+            ExchangeImpl exchange = new ExchangeImpl();
+            exchange.setInMessage(inMessage);
             setupMessage(inMessage,
                      config,
                      context,
                      req,
                      resp);
 
-            ExchangeImpl exchange = new ExchangeImpl();
-            exchange.setInMessage(inMessage);
             exchange.setSession(new HTTPSession(req));
             ((MessageImpl)inMessage).setDestination(this);
         } else {
@@ -267,13 +267,15 @@ public abstract class AbstractHTTPDestin
                           req, 
                           resp);
         
+        final Exchange exchange = inMessage.getExchange();
         DelegatingInputStream in = new DelegatingInputStream(req.getInputStream()) {
             public void cacheInput() {
-                if (!cached && inMessage.getExchange().getOutMessage() == null) {
+                if (!cached && exchange.isOneWay()) {
                     //For one-ways, we need to cache the values of the HttpServletRequest
                     //so they can be queried later for things like paths and schemes 
                     //and such like that.                   
-                    inMessage.put(HTTP_REQUEST, new HttpServletRequestSnapshot(req));
+                    //Please note, exchange used to always get the "current" message
+                    exchange.getInMessage().put(HTTP_REQUEST, new HttpServletRequestSnapshot(req));
                 }
                 super.cacheInput();
             }



Mime
View raw message