cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r801380 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Date Wed, 05 Aug 2009 19:36:28 GMT
Author: dkulp
Date: Wed Aug  5 19:36:27 2009
New Revision: 801380

URL: http://svn.apache.org/viewvc?rev=801380&view=rev
Log:
[CXF-2381] Only "safe" way to really do this is to allocate a buffer.
Other types of input streams may do similar things.

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=801380&r1=801379&r2=801380&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
Wed Aug  5 19:36:27 2009
@@ -170,12 +170,6 @@
     private static final String SC_HTTP_CONDUIT_SUFFIX = ".http-conduit";
     
     /**
-     * Buffer to use to pull unread bytes off of input streams
-     */
-    private static final byte BUFFER[] = new byte[1024];
-
-
-    /**
      * This field holds the connection factory, which primarily is used to 
      * factor out SSL specific code from this implementation.
      * <p>
@@ -619,7 +613,8 @@
         try {
             if (in != null) {
                 int count = 0;
-                while (in.read(BUFFER) != -1
+                byte buffer[] = new byte[1024];
+                while (in.read(buffer) != -1
                     && count < 25) {
                     //don't do anything, we just need to pull off the unread data (like
                     //closing tags that we didn't need to read



Mime
View raw message