cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r448565 - /incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java
Date Thu, 21 Sep 2006 14:33:11 GMT
Author: tli
Date: Thu Sep 21 07:33:10 2006
New Revision: 448565

URL: http://svn.apache.org/viewvc?view=rev&rev=448565
Log:
fix for different OS caused InternetHeader error

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java?view=diff&rev=448565&r1=448564&r2=448565
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/attachment/AttachmentUtil.java
Thu Sep 21 07:33:10 2006
@@ -71,6 +71,9 @@
 
     public static String getSoapPartHeader(Message message, String soapPartId, String action)
{
         StringBuffer buffer = new StringBuffer(200);
+        if (System.getProperty("file.separator").equals("/")) {
+            buffer.append("\n");
+        }
         buffer.append("Content-Type: application/xop+xml; charset=utf-8; ");
         buffer.append("type=\"" + message.getAttachmentMimeType());
         if (action != null) {
@@ -85,6 +88,9 @@
 
     public static String getAttchmentPartHeader(Attachment att) {
         StringBuffer buffer = new StringBuffer(200);
+        if (System.getProperty("file.separator").equals("/")) {
+            buffer.append("\n");
+        }
         buffer.append("Content-Type: " + att.getDataHandler().getContentType() + ";\n");
         if (att.isXOP()) {
             buffer.append("Content-Transfer-Encoding: binary\n");



Mime
View raw message