[jboss-remoting-commits] JBoss Remoting SVN: r3629 - remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/compress.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Thu Mar 13 03:51:22 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-03-13 03:51:22 -0400 (Thu, 13 Mar 2008)
New Revision: 3629

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/compress/CompressingUnMarshaller.java
Log:
JBREM-927: Sets content-length to Integer.MAX_VALUE if wrapped unmarshaller is HTTPUnMarshaller.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/compress/CompressingUnMarshaller.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/compress/CompressingUnMarshaller.java	2008-03-13 07:50:27 UTC (rev 3628)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/compress/CompressingUnMarshaller.java	2008-03-13 07:51:22 UTC (rev 3629)
@@ -24,6 +24,7 @@
 
 import org.jboss.remoting.marshal.UnMarshaller;
 import org.jboss.remoting.marshal.VersionedUnMarshaller;
+import org.jboss.remoting.marshal.http.HTTPUnMarshaller;
 import org.jboss.remoting.marshal.serializable.SerializableUnMarshaller;
 import org.jboss.remoting.serialization.SerializationManager;
 import org.jboss.remoting.serialization.SerializationStreamFactory;
@@ -33,6 +34,7 @@
 import java.io.InputStream;
 import java.io.ObjectInputStream;
 import java.io.OutputStream;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.zip.GZIPInputStream;
 
@@ -109,6 +111,16 @@
 
       if(wrappedUnMarshaller != null)
       {
+         // HACK for JBREM-927.
+         if (wrappedUnMarshaller instanceof HTTPUnMarshaller)
+         {
+            Map map = new HashMap();
+            if (metadata != null)
+               map.putAll(metadata);
+            map.put("Content-Length", Integer.toString(Integer.MAX_VALUE));
+            metadata = map;
+         }
+         
          if (wrappedUnMarshaller instanceof VersionedUnMarshaller)
             return ((VersionedUnMarshaller)wrappedUnMarshaller).read(ois, metadata, version);
          else




More information about the jboss-remoting-commits mailing list