[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/coyote ...

Ron Sigal ron_sigal at yahoo.com
Sun Oct 29 15:29:48 EST 2006


  User: rsigal  
  Date: 06/10/29 15:29:48

  Modified:    src/main/org/jboss/remoting/transport/coyote 
                        CoyoteInvoker.java
  Log:
  JBREM-621:  Added test for whether incoming payload is wrapped in an InvocationRequest.
  
  Revision  Changes    Path
  1.22      +8 -2      JBossRemoting/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CoyoteInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- CoyoteInvoker.java	26 Sep 2006 02:27:52 -0000	1.21
  +++ CoyoteInvoker.java	29 Oct 2006 20:29:48 -0000	1.22
  @@ -26,6 +26,7 @@
   import org.apache.tomcat.util.buf.CharChunk;
   import org.apache.tomcat.util.buf.MessageBytes;
   import org.apache.tomcat.util.http.MimeHeaders;
  +import org.jboss.remoting.Client;
   import org.jboss.remoting.InvocationRequest;
   import org.jboss.remoting.InvocationResponse;
   import org.jboss.remoting.InvokerLocator;
  @@ -73,6 +74,9 @@
      /** Indicates if client is HTTPClientInvoker */
      protected boolean isRemotingUserAgent;
   
  +   /** Indicates if input was raw or an InvocationRequest */
  +   protected boolean receivedInvocationRequest;
  +
      public CoyoteInvoker(InvokerLocator locator)
      {
         super(locator);
  @@ -354,7 +358,7 @@
               res.setStatus(status);
               res.setMessage(message);
   
  -            if (isRemotingUserAgent)
  +            if (isRemotingUserAgent && receivedInvocationRequest)
               {
                  responseMap = ((ResponseMap) responseMap).getMap();
                  responseObject = new InvocationResponse(invocationRequest.getSessionId(),
  @@ -432,6 +436,7 @@
            case Version.VERSION_2:
            {
   
  +            receivedInvocationRequest = false;
               InvocationRequest invocationRequest = null;
               if (req.method().equals("GET") || req.method().equals("HEAD"))
               {
  @@ -443,6 +448,7 @@
                  Object obj = unmarshaller.read(request.getInputStream(), request);
                  if (obj instanceof InvocationRequest)
                  {
  +                  receivedInvocationRequest = true;
                     invocationRequest = (InvocationRequest) obj;
                     if (invocationRequest.getReturnPayload() == null)
                     {
  
  
  



More information about the jboss-cvs-commits mailing list