ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r681623 - /webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c
Date Fri, 01 Aug 2008 08:01:33 GMT
Author: manjula
Date: Fri Aug  1 01:01:32 2008
New Revision: 681623

URL: http://svn.apache.org/viewvc?rev=681623&view=rev
Log:
Fixes for AXIS2C-1247.

Modified:
    webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c

Modified: webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c?rev=681623&r1=681622&r2=681623&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c (original)
+++ webservices/axis2/trunk/c/axiom/src/attachments/mime_parser.c Fri Aug  1 01:01:32 2008
@@ -583,6 +583,23 @@
     mime_parser->soap_body_str = soap_str;
     mime_parser->soap_body_len = soap_len;
 
+    /* There are multipart/related messages which does not contain attachments 
+     * The only mime_part is the soap envelope. So for those messages the mime
+     * boundary after the soap will end up with --
+     * So we will check that here and if we found then the logic inside the 
+     * while loop will not be executed */
+
+    if(len_array[buf_num] == 2)
+    {
+        end_of_mime = (AXIOM_MIME_BOUNDARY_BYTE == *(buf_array[buf_num])) &&
+                            (AXIOM_MIME_BOUNDARY_BYTE == *(buf_array[buf_num] + 1));
+        if(end_of_mime)
+        {
+            AXIS2_FREE(env->allocator, buf_array[buf_num]);
+            buf_array[buf_num] = NULL;
+        }
+    }
+
     /*<SOAP></SOAP>--MIMEBOUNDARY
       mime_headr1:.......
       mime_headr2:....



Mime
View raw message