JBoss Remoting SVN: r4581 - remoting2/branches/2.2/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 01:52:38 -0400 (Wed, 01 Oct 2008)
New Revision: 4581
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java
Log:
JBREM-1020: Updated version to 2.2.2.SP10.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java 2008-10-01 05:52:02 UTC (rev 4580)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java 2008-10-01 05:52:38 UTC (rev 4581)
@@ -32,7 +32,7 @@
public static final byte VERSION_2 = 2;
public static final byte VERSION_2_2 = 22;
- public static final String VERSION = "2.2.2.SP9";
+ public static final String VERSION = "2.2.2.SP10";
private static final byte byteVersion = VERSION_2_2;
private static byte defaultByteVersion = byteVersion;
private static boolean performVersioning = true;
16 years, 3 months
JBoss Remoting SVN: r4580 - remoting2/branches/2.2/src/main/org/jboss/remoting/marshal/http.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-10-01 01:52:02 -0400 (Wed, 01 Oct 2008)
New Revision: 4580
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/marshal/http/HTTPUnMarshaller.java
Log:
JBREM-1037: read() checks for transfer-encoding=chunked, and, if so, doesn't apply byteOutputStream.size() > contentLength test while reading from inputStream.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/marshal/http/HTTPUnMarshaller.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/marshal/http/HTTPUnMarshaller.java 2008-09-25 17:36:55 UTC (rev 4579)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/marshal/http/HTTPUnMarshaller.java 2008-10-01 05:52:02 UTC (rev 4580)
@@ -79,6 +79,7 @@
int bufferSize = 1024;
byte[] byteBuffer = new byte[bufferSize];
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
+ boolean isChunked = false;
// check the metadat to see if is entry for content length
if(metadata != null)
@@ -114,6 +115,12 @@
log.warn("Can not get Content-Length from header for http unmarshalling.");
}
}
+
+ value = metadata.get("transfer-encoding");
+ if (value instanceof String && "chunked".equalsIgnoreCase((String)value))
+ {
+ isChunked = true;
+ }
}
int pointer = 0;
@@ -121,7 +128,7 @@
while(amtRead > 0)
{
byteOutputStream.write(byteBuffer, pointer, amtRead);
- if(amtRead < bufferSize && byteOutputStream.size() >= contentLength)
+ if(!isChunked && (amtRead < bufferSize && byteOutputStream.size() >= contentLength))
{
//done reading, so process
break;
16 years, 3 months