hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r355638 - /jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java
Date Fri, 09 Dec 2005 23:18:41 GMT
Author: olegk
Date: Fri Dec  9 15:18:36 2005
New Revision: 355638

URL: http://svn.apache.org/viewcvs?rev=355638&view=rev
Log:
Minor tweak to eliminate unnecessary empty string conversion to an empty byte array in AbstractHttpDataTransmitter#writeLine(String)

Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java?rev=355638&r1=355637&r2=355638&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/io/AbstractHttpDataTransmitter.java
Fri Dec  9 15:18:36 2005
@@ -124,7 +124,9 @@
         if (s == null) {
             return;
         }
-        write(s.getBytes(this.charset));
+        if (s.length() > 0) {
+            write(s.getBytes(this.charset));
+        }
         write(CRLF);
     }
     



Mime
View raw message